Task Objective#
- Complete the setup of Nextcloud private cloud storage.
Deployment Guide#
Basic Environment Preparation#
Configure firewall policy
firewall-cmd --zone=public --add-service=http --permanent
firewall-cmd --reload
Configure SELinux policy
Set SELinux to permissive or disabled.
#Modify
setenforce 0
sudo sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
#or
setenforce 0
sudo sed -i 's/^SELINUX=enforcing/SELINUX=permissive/' /etc/selinux/config
Install Apache#
yum -y install httpd
Install PHP#
yum -y install php
#Install PHP module dependencies
yum -y install php-zip php-dom php-xml php-mbstring php-pdo php-gd
Add Nextcloud Site Configuration File#
mkdir /var/www/html/nextcloud/
chmod 777 /var/www/html/nextcloud/
#Create file
vi /etc/httpd/conf.d/nextcloud.conf
<VirtualHost *:80>
DocumentRoot /var/www/html/nextcloud/
ServerName your.server.com
<Directory /var/www/html/nextcloud/>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
</VirtualHost>
Download Nextcloud Installation File#
wget -P /var/www/html/nextcloud/ https://download.nextcloud.com/server/installer/setup-nextcloud.php
Start Service#
systemctl start httpd
systemctl enable httpd
Access via Browser#
Enter http://172.20.1.51/setup-nextcloud.php
in the browser and follow the prompts to set up. As shown in the figure below.
Set the username and password, install the database as shown in the figure below.
Successfully entered the content interface, deployment completed, as shown in the figure below.