Advance

How to install NextCloud on CentOS 8

Richard 11 Min Read
How to install NextCloud on CentOS 8
3
(2)

To introduce an open-source, on-premise file share, and collaborative platform, you will learn How to install NextCloud on CentOS 8. NextCloud allows you to save your files and access them across multiple devices such as PCs, smartphones, and tablets. As a popular self-hosting platform that works much like DropBox, it allows you to seamlessly collaborate on various projects, manage your calendar, send and receive emails as well as make video calls.

 

Prerequisites:

Since you will be accessing NextCloud via a browser, it’s crucial to ensure that the LAMP stack is already installed on CentOS 8. 

Recommended Article: How to Find Out Which Process Listening On A Particular Port

How to install NextCloud on CentOS 8

Let’s walk through the steps of this article to show you How to install NextCloud on CentOS 8.

 

1- Install Additional PHP Modules

Some requisite PHP modules are required for NextCloud to function well.

sudo dnf install php-mysqlnd php-xml php-zip  php-curl php-gd php-intl php-json php-ldap php-mbstring php-opcache   

 

2- Create a NextCloud Database

Once the necessary PHP modules installation completed, create a database that will contain NextCloud’s data by log in to the MariaDB database engine using the command below and provide the password.

mysql -u root -p  

After logging in, create a database and a database user for NextCloud using the commands below.

MariaDB [(none)]> CREATE DATABASE nextcloud_db;  MariaDB [(none)]> GRANT ALL ON nextcloud_db.* TO ‘nextcloud_user’@’localhost’ IDENTIFIED BY ‘StrongP@ssword’;  MariaDB [(none)]> FLUSH PRIVILEGES;  MariaDB [(none)]> EXIT;

 

buy VPS with bitcoin

 

3- Install NextCloud on CentOS 8

At this point, you must download NextCloud zipped file from NextCloud’s official site. By the time of writing down this guide, the latest version of NextCloud is 18.0.1.

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

Then, unzip the file to the /var/www/html/ path.

sudo unzip nextcloud-18.0.1 -d /var/www/html/  

Now, create a directory to store the admin user data.

sudo mkdir -p /var/www/html/nextcloud/data  

Next, to let the Apache user can append data into it, you need to modify NextCloud’s directory permissions.

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

 

4- Setting Up SELinux and Firewall for NextCloud

This step requires you to make a few configurations for SELinux so that it can handle Nextcloud without any problems. Type the following commands to do this:

sudo semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/data'  sudo semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/config(/.*)?'  sudo semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/apps(/.*)?'  sudo semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/3rdparty(/.*)?'  sudo semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/.htaccess'  sudo semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/.user.ini'  sudo restorecon -Rv '/var/www/html/nextcloud/

Also, you need to open the webserver port 80 to allow external users to access NextCloud from your server. Type the following commands to do this:

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

 

5- Finalizing the NextCloud Installation

To start this step, first, create an Admin username and password. secondly, click on ‘Storage and database’.Then, select ‘MariaDB’ as the preferred database engine and fill in the database details. And once the database details have been filled, click on the ‘Finish’ button to complete the setup.

After all, this takes you to the login page. Provide the username and password and hit ‘ENTER’ or click on the ‘Login’ button.

Note: A brief walkthrough about NextCloud will be given in a slide format if you are logging in for the first time. Feel free to scroll to the right for more tips.

Finally, you can close the window to give you access to the dashboard.

 

Good job! You are now at the end of this guide and you can backup, sync, and share files with your friends and colleagues on NextCloud.

 

Dear user, we wish this tutorial would be helpful for you, to ask any question or review the conversation of our users about this article, please visit Ask page. Also to improve your knowledge, there are so many useful tutorials ready for Eldernode training.

How useful was this post?

Click on a star to rate it!

Average rating 3 / 5. Vote count: 2

No votes so far! Be the first to rate this post.

View More Posts
Richard
Eldernode Writer
We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave a Reply

Your email address will not be published. Required fields are marked *

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day