Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

How to Install NextCloud on CentOS 8 - DesignLinux

May 29 2020
designlinux 0 Comments

NextCloud is an open-source, on-premise file share and collaborative platform that 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.

In this guide, you will learn how to install NextCloud on CentOS 8.

Prerequisites:

Since we will be accessing NextCloud via a browser, it’s crucial to ensure that the LAMP stack is already installed on CentOS 8. LAMP is short for Linux, Apache, MySQL / MariaDB and PHP.

Step 1: Install Additional PHP Modules

Some requisite PHP modules are required for NextCloud to function as expected. Install them as shown below.

$ sudo dnf install php-mysqlnd php-xml php-zip  php-curl php-gd php-intl php-json php-ldap php-mbstring php-opcache 
Install PHP Modules in CentOS 8

Install PHP Modules in CentOS 8

Step 2: Create a NextCloud Database

After installing the necessary PHP modules, 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

Upon 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 ‘[email protected]’;
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;
Create NextCloud Database

Create NextCloud Database

Step 3: Install NextCloud on CentOS 8

The next step requires you to 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.

To download NextCloud, run the following wget command.

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

Unzip the file to the /var/www/html/ path.

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

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

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

Then modify NextCloud’s directory permissions so that the Apache user can append data into it.

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

Step 4: Setting Up SELinux and Firewall for NextCloud

You need to make a few configurations for SELinux so that it can handle Nextcloud without any problems. So run the commands below.

$ 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/'

To allow external users to access NextCloud from your server, you need to open the webserver port 80. So run the commands below.

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

Step 5: Finalizing the NextCloud Installation

To complete NextCloud setup, launch your browser and browse the server’s IP address a shown.

http://server-IP/nexcloud

Create an Admin username and password.

Create NextCloud Admin Account

Create NextCloud Admin Account

Next, click on ‘Storage and database’. Select ‘MariaDB’ as the preferred database engine and fill in the database details.

Set NextCloud Database Settings

Set NextCloud Database Settings

The database details have been filled as shown below.

NextCloud Database Settings

NextCloud Database Settings

Finally, click on the ‘Finish’ button to complete the setup.

Finish NextCloud Setup

Finish NextCloud Setup

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

NextCloud Admin Login

NextCloud Admin Login

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.

A Brief About NextCloud

A Brief About NextCloud

And finally, close the window to give you access to the dashboard.

NextCloud Admin Dashboard

NextCloud Admin Dashboard

And this brings us to the end of this guide. You can now backup, sync and share files with your friends and colleagues on NextCloud. Thanks for coming this far. We hope this guide was inspiring.

Sharing is Caring…
Share on FacebookShare on TwitterShare on LinkedinShare on Reddit

Related

Tags: CentOS Tips, cloud storage

How to Install Perl Modules Using CPAN on CentOS 8

Prev Post

How to Install and Configure an NFS Server on Ubuntu 18.04

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 0
  • 1,221
  • 616,910

DesignLinux.com © All rights reserved

Go to mobile version