Nextcloud安装部署(LAMP)
安装依赖
1
yum install -y epel-release yum-utils unzip curl wget bash-completion policycoreutils-python mlocate bzip2 unzip
安装Apache
1
2
3yum install -y httpd
systemctl enable httpd.service
systemctl start httpd.service安装Mariadb
1
2
3
4yum install mariadb-server -y
systemctl start mariadb
systemctl enable mariadb1
2
3
4
5创建数据库
create database nextcloud CHARACTER SET utf8 COLLATE utf8_general_ci;
授权
grant all privileges on nextcloud.* to test@localhost identified by 'Test123';
flush privileges;安装Php7.2
1
2
3
4
5
6
7
8
9
10
11#卸载老版本php
yum remove php* php-common
# 安装php7 yum源
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install -y php72w php72w-cli php72w-common php72w-curl php72w-gd \
php72w-mbstring php72w-mysqlnd php72w-process php72w-xml php72w-zip \
php72w-opcache php72w-pecl-apcu php72w-intl php72w-pecl-redis mod_ssl
systemctl restart httpd安装Nextcloud
1
2
3
4cd var/www/html/
wget https://download.nextcloud.com/server/releases/nextcloud-18.0.4.zip
unzip nextcloud-15.0.0.zip
chown -R apache:apache /var/www/html/nextcloud配置虚拟主机
1
2
3
4
5
6
7
8
9
10
11
12vim /etc/httpd/conf.d/vhost.conf
<VirtualHost *:80>
DocumentRoot "/var/www/html"
ServerName cloud.qcloudv.xyz
ServerAlias cloud.qcloudv.xzy
<Directory "/var/www/html/">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>1
systemctl restart httpd
配置https
yum install mod_ssl -y
SSLEngine on SSLCertificateFile /etc/httpd/ssl/qcloudv.xyz.crt SSLCertificateKeyFile /etc/httpd/ssl/qcloudv.xyz.key
初始化配置
配置mysql 创建admin账号
登录测试