Red Hat

How to Install OwnCloud Rocky Linux 8

How to Install OwnCloud Rocky Linux 8

OwnCloud is a popular file-sharing platform that allows users to securely upload and share their files with other users. It’s a client-server platform that is trusted used by millions of users worldwide. It is very similar to Dropbox in terms of functionality and can be used on virtually any device including PCs and smart devices such as mobile devices ( both iOS and Android devices ). You can try OwnCloud online which is a SaaS platform with servers hosted in Germany or simply install OwnCloud on a VPS server on your webhost.

Owncloud comes in Community, Standard and Enterpise editions. The community edition is free to download and install.

Join us as we install OwnCloud on Rocky Linux 8.

Prerequisites

For this walkthrough, you will need to ensure that you have the LAMP stack installed. This will provide the webserver on which OwnCloud will be hosted, a database server, and PHP scripting language which will support various PHP operations.

Additionally, ensure that you have SSH access to the server with a sudo user already configured.

Step 1: Install PHP extensions

For the installation of Owncloud to proceed seamlessly, some additional PHP extensions are needed. So, execute the following command to achieve this.

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

After the installation of the quintessential PHP extensions, proceed to the next step.

Step 2: Create OwnCloud database

Moving on, we will embark on creating a database for Owncloud that will install all the files during and post installation. Therefore, login to MariaDB as shown:

$ sudo mysql -u root -p

Now, create a database for OwnCloud. Here, myowncloud_db is the database

CREATE DATABASE myowncloud_db;

Next, create the database user and set a strong password.

CREATE USER `myowncloud_user`@`localhost` IDENTIFIED BY 'strong-password';

And then grant all privileges to the database user on the database.

GRANT ALL ON myowncloud_db.* TO 'myowncloud_user'@`localhost`;

Then be sure to save the database changes and exit MariaDB database sever.

FLUSH PRIVILEGES;
EXIT;

Step 3: Download OwnCloud

Having successfully configured the OwnCloud database, proceed and download Owncloud’s tarball file using wget command.

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

Step 4: Configure OwnCloud

With the compressed file downloaded, the next course of action is to configure OwnCloud. We’ll start by extracting the tarball file to the /var/www/html path.

$ sudo tar -jxf owncloud-complete-20210721.tar.bz2 -C /var/www/html

If you get an error whilst extracting, install the bzip2 utility

$ sudo dnf install bzip2

Next, set the ownership of OwnCloud directory to Apache using the chown command as follows.

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

Additionally, set the permissions shown to the Owncloud directory to make it accessible and readable.

$ sudo chmod -R 775 /var/www/html/owncloud

Step 5: Configure Apache to host OwnCloud files

We further need to create a virtual host file for Owncloud so that Apache is made aware of the OwnCloud directory location.

Therefore, create a configuration file for OwnCloud as provided.

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

Copy and paste these lines and save the changes.

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

<Directory /var/www/html/owncloud/>

 Options +FollowSymlinks

 AllowOverride All

 <IfModule mod_dav.c>

 Dav off

 </IfModule>

 SetEnv HOME /var/www/html/owncloud

 SetEnv HTTP_HOME /var/www/html/owncloud

</Directory>

To save the changes, restart Apache.

$ sudo systemctl restart httpd

Remember to set SELinux to handle OwnCloud

$ sudo setsebool -P httpd_unified 1

Great, we are now all set to finalize the installation from a web browser.

Step 6: Finalize OwnCloud installation from a browser

The final step is to finalize the setup of OwnCloud from the browser. To brown the URL provided, replacing server-ip with your own IP address

http://server-ip/owncloud

The first page requires you to do two things: create and Admin account and provide the database details.

So, provide the username and password to create an Admin user.

Next, hit on on ‘Storage & database’ link and fill in the database details.

Finally, click the ‘Finish setup’ button.

Once you click the ‘Finish’ button, you are taken to the Login page. Enter the Admin login credentials and hit the ‘Login’ button.

The dashboard will be displayed as shown with a summary of the various options you can use to access OwnCloud and save your data.

From here you can start uploading and sharing your files with other users.

And there it is. We have managed to successfully install OwnCloud on Rocky Linux 8.

Similar Posts