一、httpd 或者 nginx 安装完,无法访问 1、80端口未备案情况,默认被屏蔽 2、修改服务端口,并在安全组里面开放(httpd.conf or nginx.conf listen xx ) 二、mysql 远程用户登陆 1、使用端口参数 -P 2、查看mariadb 所用端口 cat /etc/my.cnf show global variables like 'port' 3、修改mariadb 端口 vim /etc/my.cnf 修改或者增加 port=xx 4、远程登陆mysql -u root -h 地址 -P 端口 -p 无法访问 检查地址登陆权限 select user,host,password from user; 检查用户及密码 use mysql alter user 'root'@'localhost' identified by 'youpassword'; flush privileges; 5、允许用户通过root访问 服务器(IP)的nextcloud_db 数据库,及设置密码 grant all privileges on nextcloud_db.* to root@×××××× identified by '××××××';

三、安装php7.2 1、yum install -y centos-release-scl 2、yum install -y rh-php72 rh-php72-php rh-php72-php-gd rh-php72-php-mbstring rh-php72-php-intl rh-php72-php-pecl-apcu rh-php72-php-mysqlnd rh-php72-php-pecl-redis rh-php72-php-opcache rh-php72-php-imagick

四、拷贝setup-nextcloud.php 文件到服务器目录 rsync -avh /root/downloads/setup-nextcloud.php root@×××××××:/var/www/html/

五、nextcloud.php 配置 chown -R apache:apache /var/www/html/nextcloud

六、打开浏览器,访问服务地址,总是下载PHP文件,无法打开 修改 nginx.conf 配置文件,添加以下配置: location ~* .php$ { try_files $uri =404; include fastcgi.conf; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; } 参考文档:https://cloud.tencent.com/developer/ask/55032

七、更新mysql用户密码 use mysql; update user set authentication_string=password('newword') where user='root'; flush privileges;