Biblioteca de cunoștințe

How to install Nextcloud 11 on CentOS 7 Print

  • 0

Installing  Nextcloud 11 on CentOS 7 is an easy task if you follow the steps bellow. Nextcloud is an open source software for creating and using file hosting services. It has a lot of extra Calendar, Sync and Contacts features, apart from their file hosting features. In this tutorial, we gonna show you How to install Nextcloud 11 on CentOS 7.

 

In order to run Nextcloud on your Server, the following requirements have to be installed:

  • MySQL or MariaDB
  • PHP 7.0 +
  • Apache 2.4 with mod_php module
If you want to use an Ubuntu Server, check our tutorial on how to install Nextcloud on Ubuntu 16.04 

1. Update the system

First of all login to your CentOS 7 VPS via SSH as user root:

ssh root@IP_Address

and make sure that it is fully up to date:

yum -y update

2. Install MariaDB server

Nextcloud requires an empty database, so we will install MariaDB server:

yum -y install mariadb mariadb-server

Once it is installed, start MariaDB and enable it to start on boot:

systemctl start mariadb
systemctl enable mariadb

and run the mysql_secure_installation post-installation script to finish the MariaDB set-up:

mysql_secure_installation

Enter current password for root (enter for none): ENTER
Set root password? [Y/n] Y
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y

Once MariaDB is installed, login to the database server as user root, and create database and user for Nextcloud:

mysql -u root -p

MariaDB [(none)]> CREATE DATABASE nextcloud;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextclouduser'@'localhost' IDENTIFIED BY 'YOURPASSWORD';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

3. Install Apache Web Server

Next, we will install Apache web server:

yum install httpd -y

start Apache and make it start on boot:

systemctl start httpd.service
systemctl enable httpd.service

4. Install PHP 7

The default PHP version on CentOS 7 is PHP 5.4. In this tutorial, we will install PHP version 7.

Install Remi and EPEL repository packages:

rpm -Uvh https://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Enable Remi PHP 7 repo:

yum-config-manager --enable remi-php70

and install PHP 7 and several PHP modules required by Nextcloud by executing the following command:

yum -y install php php-mysql php-pecl-zip php-xml php-mbstring php-gd

Next, open the PHP configuration file and increase the upload file size. You can find the location of the PHP configuration file by executing the following command:

php --ini |grep Loaded
Loaded Configuration File:         /etc/php.ini

In our case, we have to make changes to the /etc/php.ini file. We will increase the default upload limit to 100 MB. You can set the values according to your needs. Run the following commands:

sed -i "s/post_max_size = 8M/post_max_size = 100M/" /etc/php.ini
sed -i "s/upload_max_filesize = 2M/upload_max_filesize = 100M/" /etc/php.ini

and restart the web server:

systemctl restart httpd

5. Install Nextcloud

Go to Nextcloud’s official website and download the latest stable release of the application

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

unpack the downloaded zip archive to the document root directory on your server

unzip nextcloud-11.0.2.zip -d /var/www/html/

Set the Apache user to be owner of the Nextcloud files

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

Finally, access Nextcloud at https://yourIP/nextcloud . The installation wizard will check if all requirements and if everything is OK, you will be prompted to create your admin user and select storage and database. Select MySQL/MariaDB as database and enter the details for the database we created earlier in this post:

Database user: nextclouduser
Database password: YOURPASSWORD
Database name: nextcloud
host: localhost

Installing  Nextcloud 11 on CentOS 7 is an easy task if you follow the steps bellow. Nextcloud is an open source software for creating and using file hosting services. It has a lot of extra Calendar, Sync and Contacts features, apart from their file hosting features. In this tutorial, we gonna show you How to install Nextcloud 11 on CentOS 7.

 

In order to run Nextcloud on your VPS, the following requirements have to be installed:

  • MySQL or MariaDB
  • PHP 7.0 +
  • Apache 2.4 with mod_php module

Răspunsul a fost util?
Back