标签:script doc def 输入 nextcloud try_files code process vim
1.下载程序包wget https://download.nextcloud.com/server/releases/nextcloud-17.0.2.zip
unzip nextcloud-17.0.2.zip #解压程序包
mkdir /data -pv #创建总数据存储目录
mkdir /data/data/ #创建数据存储目录(用来存放用户上传的文件)
mv nextcloud /data/ #移动网盘程序目录
chown -R nginx.nginx /data/ #把属组都改为nginx
yum install https://mirror.webtatic.com/yum/el7/webtatic-release.rpm -y
#安装php程序包的 源
yum -y install php72w.x86_64 php72w-cli.x86_64 php72w-common.x86_64 php72w-gd.x86_64 php72w-ldap.x86_64 php72w-mbstring.x86_64 php72w-mysql.x86_64 php72w-pdo.x86_64 php72w-pear.noarch php72w-process.x86_64 php72w-xml.x86_64 php72w-xmlrpc.x86_64 php72w-fpm.x86_64
#安装php7.2
vim /etc/php-fpm.d/www.conf #修改php 配置
yum install nginx -y #安装nginx
vim /etc/nginx/nginx.conf #修改nignx配置文件
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /data/nextcloud;
index index.html index.htm index.php;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
#try_files $uri $uri/ /index.php$uri;
}
location ~ \.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
#这两句是开启nginx pathinfo nextcloud必须要开
#fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}
浏览器输入ip地址
#按照上图配置,最后点击完成
标签:script doc def 输入 nextcloud try_files code process vim
原文地址:https://blog.51cto.com/13620944/2467414