In this article we will be performing an installation of OwnCloud directly from the official OwnCloud package. OwnCloud is a suite of client-server software to provide easy file sharing. The operating system to be used will be RHEL 8 server with MariaDB, PHP and Apache web-server.

In this tutorial you will learn:
  • How to install Owncloud prerequisites
  • How to download and upzip OwnCloud source package
  • How to setup MariaDB database
  • How to setup OwnCloud
Successful OwnCloud installation on Red Hat Enterprise Linux 8
Successful OwnCloud installation on Red Hat Enterprise Linux 8

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Red Hat Enterprise Linux 8
Software OwnCloud 10.0.10 or higher
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ - requires given linux commands to be executed as a regular non-privileged user

How to install OwnCloud on RHEL 8 server step by step instructions

  1. 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.
  2. Install all required OwnCloud prerequisites.

    The following command will perform an installation of all OwnCloud prerequisites in addition to the PHP packages already installed in Step 1:
    # dnf install php-mbstring php-gd php-pecl-zip php-xml php-json php-intl unzip
    
    OwnCloud prerequisites on RHEL 8 Linux server
    OwnCloud prerequisites on RHEL 8 Linux server
  3. Download and install OwnCloud.

    Next step is to download a latest official OwnCloud Server source code package from the OwnCloud.org website. Perhaps the most convenient way to perform this task is by using the wget command. At the time of writing the latest OwnCloud version is 10.0.10. Update the below link if necessary:
    DOWNLOAD LATEST VERSION:
    $ wget https://download.owncloud.org/community/owncloud-10.0.10.zip
    
    Once the package is downloaded execute the below step to unzip the package into /var/www/html, create data directory and set appropriate directory permissions:
    # unzip owncloud-10.0.10.zip -d /var/www/html
    # mkdir /var/www/html/owncloud/data
    # chown -R apache:apache /var/www/html/owncloud/*
    # chcon -t httpd_sys_rw_content_t /var/www/html/owncloud/ -R
    
    Extract OwnCloud source package and set appropriate directory permissions
    Extract OwnCloud source package and set appropriate directory permissions
  4. Create MariaDB database to be used with OwnCloud.

    The following commands will create MariaDB database named owncloud and user admin with password pass:
    # mysql -u root -p
    mysql> CREATE DATABASE owncloud;
    mysql> CREATE USER `admin`@`localhost` IDENTIFIED BY 'pass';
    mysql> GRANT ALL ON owncloud.* TO `admin`@`localhost`;
    mysql> FLUSH PRIVILEGES;
    mysql> exit
    
    Setting up MariaDB SQL database for OwnCloud server on RHEL 8
    Setting up MariaDB SQL database for OwnCloud server on RHEL 8
  5. Start OwnCloud wizard and perform a final installation.

    Navigate your browser to your servers URL and fill up the OwnCloud setup form:
    OwnCloud wizard installation form on RHEL 8 Linux server
    OwnCloud wizard installation form on RHEL 8 Linux server. Once ready click on Finish setup button.
    WARNING
    In case you see the below error message make sure that you have correctly installed all OwnCloud prerequisites as per Step 2. Use the # php -m | grep -i PHP MODULE NAME command to list if the required PHP module is available.
    ERROR 500: Internal Server Error.
    
  6. Your installation of OwnCloud should be now ready. Optionally install additional OwnCloud recommended PHP modules or secure your installation with mod_ssl.
ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed on LinuxCareers.com.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in:



Comments and Discussions