码迷,mamicode.com
首页 > 其他好文 > 详细

部署nextcloud私有云盘

时间:2020-01-17 21:24:46      阅读:111      评论:0      收藏:0      [点我收藏+]

标签: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

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私有云盘

标签:script   doc   def   输入   nextcloud   try_files   code   process   vim   

原文地址:https://blog.51cto.com/13620944/2467414

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!