部署nextcloud私有云盘
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了部署nextcloud私有云盘相关的知识,希望对你有一定的参考价值。
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
2.安装php7.2
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 配置
3.安装配置nginx
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;
}
}
}
4.登录配置
浏览器输入ip地址
#按照上图配置,最后点击完成
以上是关于部署nextcloud私有云盘的主要内容,如果未能解决你的问题,请参考以下文章