Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to Install NextCloud on CentOS 7

Nextcloud is completely free and open-source cloud software alternative, giving the user full control over their data and allowing them to store and sync their data from numerous devices to their Nextcloud Server. It is founded by the co-founder of ownCloud, and it is a great free alternative to the popular platforms such as Google Drive, Dropbox and OneDrive. In this tutorial, we will show you how to install Nextcloud on one of our CentOS 7 virtual servers.

For best performances and functionality of Nextcloud your CentOS 7 VPS has to meet the following requirements:

  • Apache or Nginx web server
  • MySQL or MariaDB database server
  • PHP version 5.4 or newer
  • 512 MB RAM or more

To start the installation you have to login to your server as user root

ssh root@IP_Adress

It is a good practice to always update the packages installed on your server to the latest version available

yum -y update

Install Apache and PHP

Install Apache web server on your CentOS 7 VPS

yum -y install httpd

Start the web server once it is installed and enable it to start at system boot

systemctl start httpd
systemctl enable httpd

Install PHP and some required PHP modules

yum -y install php php-mysql php-dom php-xml php-gd php-mbstring php-pdo php-common php-json

and restart the web server

systemctl restart httpd

Install MariaDB server

Nextcloud requires an empty database, so we have to install a database server and create a new database. Run the following command to install Mariadb server

yum install -y mariadb-server mariadb

Start the database server and enable it to start on boot

systemctl start mariadb
systemctl enable mariadb

Execute the mysql_secure_installation script to secure your MariaDB server, set a root password, etc..

mysql_secure_installation

Once everything is installed and properly configured, login to the MariaDB server as user root and create a new database and user for Nextcloud.

mysql -u root -p
Enter password:

MariaDB [(none)]> CREATE DATABASE nextcloud;
MariaDB [(none)]> GRANT ALL ON nextcloud.* TO 'user'@'localhost' IDENTIFIED BY 'PASSWORD';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit

Don’t forget to replace ‘PASSWORD’ with an actual strong password.

Install and configure Nextcloud

Go to Nextcloud’s official website and download the latest stable version of the application to your server. At the moment of writing this article, it is version 11.0.1

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

Unpack the downloaded zip archive to the document root directory on your server.

yum -y install unzip
unzip nextcloud-11.0.1.zip -d /var/www/html

Change the ownership of all Nextcloud files and directories

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

Now, we have to complete the Nexcloud installation from a web browser. Access the application at http://yourdomain.com/nextcloud and create an admin user to finish the setup. You should visit Nextcloud’s official documentation to learn more about the application and how to manage it.


PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.



This post first appeared on Virtual-Server.org Virtual Server, please read the originial post: here

Share the post

How to Install NextCloud on CentOS 7

×

Subscribe to Virtual-server.org Virtual Server

Get updates delivered right to your inbox!

Thank you for your subscription

×