Centos8 deploy nextcloud network disk


Nextcloud is an open source storage software. It has rich functions and supports multiple people to work together. Currently, it is completely free.

Official website: https://www.nextcloud.com

Architecture: lamp or LNMP

This paper is based on lamp

Note: the minimum version of PHP is 7.2


Shut down SELinux:

1. Temporary shutdown: setenforce 0: temporary shutdown, no need to restart the system

2. Permanent shutdown: sed – I “s / SELinux = enforcing / SELinux = disabled / g” etc / SELinux / config: permanently shut down, system restart is required


Turn off the firewall:

systemctl  stop  firewalld

The corresponding ports can also be released:

firewall-cmd  –zone=public   –add-port=80/tcp  –permanent

firewall-cmd  –zone=public  –add-port=3306/tcp  –permanent

To install the Apache 2 server:

yum install -y httpd

Start httpd

systemctl  start  httpd

To install the MariaDB database:

yum  install  -y  mariadb  mariadb-server

Start MariaDB:

systemctl  start  mariadb

MariaDB operation:

Log in to MariaDB:

MySQL – U root – P (default password is empty)

Create database nextcloud:

create  database if not  exists  `nextcloud`   default  character  set utf8  collate  utf8_general_ci;

Create account nextcloud:

create  user   [email protected]’localhost’  identified   by  “nextcloud”;

Permission to authorize nextcloud:

grant  all privileges  on   nextcloud.*   to  [email protected]’localhost’  identified  by  ‘nextcloud’;

To refresh the MariaDB permission table:

flush  privileges;

Centos7 installation php7.2:

phpHigher versionyumSource address, there are two parts, one of which isepel-releaseAnd the other part comes fromwebtatic。 If you skipepel-releaseIf so, install itwebtaticWhen it comes to reporting errors.

Add enterprise extension source:

      yum install epel-release -y

Add webmatic source

      rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm


PHP to install:

yum  -y  install httpd php php-cli php-mysqlnd php-zip php-devel php-gd  php-mbstring php-curl php-xml php-pear php-bcmath php-json php-pdo php-pecl-apcu php-pecl-apcu-devel

If you feel troublesome, you can use it directly:

yum  install  -y  php* 

If an error is encountered, execute:

Yum install PHP * — skip broken


If it is centos8 / rhel8, it is very convenient to execute directly:

yum install  -y   php*       


Download nextcloud:

yum  install  -y  wget

wget  -c   https://download.nextcloud.com/server/releases/nextcloud-19.0.1.zip

Unzip nextcloud to / var / www / HTML

yum  install  -y  unzip

unzip  -q  nextcloud-19.0.1.zip


Set the owner and group of the root directory of the network disk

                     chown  -R   apache:apache   /var/www/html


Enter IP to enter the installation wizard

After installation, log in to the background interface:


Nextcloud client download for each platform:

Nextcloud Windows client: https://download.nextcloud.com/desktop/releases/Windows/latest

Nextcloud MacOS client: https://download.nextcloud.com/desktop/releases/Mac/Installer/latest

Nextcloud Linux client: https://download.nextcloud.com/desktop/releases/Linux/latest

Nextcloud Android client: https://apps.nextcloud.com/categories/integration?search=android

Nextcloud IOS client: https://apps.nextcloud.com/categories/integration?search=ios