In this tutorial you will learn:
- How to install Nextcloud prerequisites
- How to download and upzip Nextcloud source package
- How to setup MariaDB database
- How to setup Nextcloud
Software Requirements and Conventions Used
|Category||Requirements, Conventions or Software Version Used|
|System||RHEL 8 / CentOS 8|
|Software||Nextcloud 15.0.2 or higher|
|Other||Privileged access to your Linux system as root or via the |
|Conventions|| # - requires given linux commands to be executed with root privileges either directly as a root user or by use of |
How to install Nextcloud on RHEL 8 / CentOS 8 server step by step instructions
- Install LAMP ( Linux, Apache, MariaDB and PHP ) server. Before you continue please follow our instructions on how to setup basic LAMP server on RHEL 8. Once ready move to the next step.
- Install all required Nextcloud prerequisites.
The following command will perform a package installation of all Nextcloud prerequisites in addition to the PHP packages already installed in
# dnf install php-mbstring php-gd php-pecl-zip php-xml php-json unzip
- Download and install Nextcloud.
Next step is to download a latest official Nextcloud Server source code package from the Nextcloud.com website. Perhaps the most convenient way to perform this task is by using the
DOWNLOAD LATEST VERSION: $ wget https://download.nextcloud.com/server/releases/latest.zipOnce the package is downloaded execute the below step to unzip the package into
datadirectory and set appropriate directory permissions:
# unzip latest.zip -d /var/www/html # mkdir /var/www/html/nextcloud/data # chown -R apache:apache /var/www/html/nextcloud/* # chcon -t httpd_sys_rw_content_t /var/www/html/nextcloud/ -R
- Create MariaDB database to be used with Nextcloud.
The following commands will create MariaDB database named
# mysql -u root -p mysql> CREATE DATABASE nextcloud; mysql> CREATE USER `admin`@`localhost` IDENTIFIED BY 'pass'; mysql> GRANT ALL ON nextcloud.* TO `admin`@`localhost`; mysql> FLUSH PRIVILEGES; mysql> exit
- Start Nextcloud wizard and perform a final installation.
Navigate your browser to your servers URL and fill up the Nextcloud setup form:
In case you see the below error message make sure that you have correctly installed all Nextcloud prerequisites as per
Step 2. Use the
# php -m | grep -i PHP MODULE NAMEcommand to list if the required PHP module is available.
Internal Server Error The server encountered an internal error and was unable to complete your request. Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report. More details can be found in the webserver log.
- Your installation of Nextcloud should be now ready. Optionally install additional Nextcloud recommended PHP modules or secure your installation with