How to Install OwnCloud on CentOS 8

Owncloud is a market-leading, client-server software that offers a cloud platform that allows you to back-up your files in a central location and syncs them on the cloud. It’s an excellent alternative to popular backup applications such as OneDrive, Dropbox and Google Drive.

Unlike these popular platforms, OwnCloud doesn’t offer data center capabilities for hosting files. Nevertheless, you will be guaranteed the security and privacy of your stored data.

In this article, we will walk you through how you can install OwnCloud on CentOS 8.

Prerequisites

Before we get started, ensure that you have a LAMP stack installed and running.

With all the requirements fulfilled, we can roll our sleeves and get started!

Step 1: Install Additional PHP Modules

OwnCloud is a PHP application and its official documentation recommends PHP 7.3 or PHP 7.2 which comes installed by default. Also, some additional PHP extensions are required by OwnCloud for it to work seamlessly.

So open your terminal as a sudo user and run the command.

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

Install PHP Modules

Step 2: Create a Database for OwnCloud

After installing the requisite PHP extensions, login to the MariaDB database engine using the command below and provide the password.

$ mysql -u root -p

Upon logging in, create a database for OwnCloud and add a user for the database.

MariaDB [(none)]> CREATE DATABASE owncloud_db;
MariaDB [(none)]> GRANT ALL ON owncloud_db.* TO 'owncloud_user'@'localhost' IDENTIFIED BY '[email protected]';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;
Create OwnCloud Database

Create OwnCloud Database

Step 3: Download OwnCloud in CentOS 8

The next step is to download the OwnCloud file, by the time of writing this guide, the latest version on OwnCloud is 10.3.2. Using the wget command, download the latest tarball file.

$ wget https://download.owncloud.org/community/owncloud-10.3.2.tar.bz2

Then extract the tarball file to the /var/www/ directory.

$ sudo tar -jxf owncloud-10.3.2.tar.bz2 -C /var/www/

Next, configure ownership permissions that will allow Apache webserver to read / access Owncloud’s files and folders.

$ sudo chown -R apache: /var/www/owncloud

Step 4: Configure Apache Web Server for OwnCloud

A few changes are required for the Apache webserver to serve OwnCloud. So create a configuration for OwnCloud.

$ sudo vim /etc/httpd/conf.d/owncloud.conf

Append the following configuration.

Alias /owncloud "/var/www/owncloud/"

<Directory /var/www/owncloud/>
  Options +FollowSymlinks
  AllowOverride All

 <IfModule mod_dav.c>
  Dav off
 </IfModule>

 SetEnv HOME /var/www/owncloud
 SetEnv HTTP_HOME /var/www/owncloud

</Directory>

Save and exit the file.

For the changes to come into effect, restart the webserver and confirm the status by running.

$ sudo systemctl restart httpd
$ sudo systemctl status httpd
Check Apache Service Status

Check Apache Service Status

If SELinux is enabled and running, execute the command below to allow the Apache webserver to write to Owncloud’s directory.

$ sudo setsebool -P httpd_unified 1

Step 5: Finalize Installation of OwnCloud on CentOS 8

With all the major configurations done, it’s time to finalize the installation of OwnCloud. So launch your browser and visit your server’s IP as shown.

http://server-ip/owncloud
OwnCloud Login

OwnCloud Login

Provide the username and password as shown above. Next click on ‘Storage and database’ link directly below and select ‘MySQL/MariaDB’ database. Fill out all the database details i.e database user, password, and database name.

OwnCloud Database Details

OwnCloud Database Details

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

Complete OwnCloud Installation

Complete OwnCloud Installation

This brings you to the login page where you will log in with the username and password that you specified earlier on.

OwnCloud Login

OwnCloud Login

Since we are logging in for the first time, you will be presented with options for installing the owncloud App on different platforms such as Android and iOS.

OwnCloud App Installation

OwnCloud App Installation

This is what the dashboard looks like. Quite simple and intuitive to use.

OwnCloud Dashboard

OwnCloud Dashboard

And that’s how you install OwnCloud on CentOS 8. Your feedback is much welcome.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

James Kiarie

This is James, a certified Linux administrator and a tech enthusiast who loves keeping in touch with emerging trends in the tech world. When I'm not running commands on the terminal, I'm taking listening to some cool music. taking a casual stroll or watching a nice movie.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide
The Complete Linux System Administrator Bundle
Become an Ethical Hacker Bonus Bundle

You may also like...

Got something to say? Join the discussion.

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.