HomeHOWTOSHow to Install and Configure Owncloud on Rocky Linux 9|AlmaLinux 9

How to Install and Configure Owncloud on Rocky Linux 9|AlmaLinux 9

In this amazing guide, we will walk you through how to install and configure Owncloud on Rocky Linux 9|AlmaLinux 9.

Managing and working together on all types of data, including multimedia, office documents, and calendar events, is possible with ownCloud, a personal cloud storage service. The application serves as a hub for file storage, a collaboration toolkit, and more as needed to meet the demands of your project or team. It is created using the PHP programming language and a MySQL/MariaDB database.

Furthermore, you can integrate using a variety of third-party programs, including:

  • Email accounts from email service providers
  • Office software packages
  • Data flow diagrams
  • GPS mapping
  • MFA service providers

In order to speed up operations, users frequently use the Cloud’s file-sharing and collaboration features. Due to this, users and teams may do their tasks quickly and conveniently, regardless of their location.

What is ownCloud?

Owncloud is a file server that includes a collection of software that enables users to conveniently and securely upload and share their files and folders. Both an on-site server and a virtual server hosted by your web host are viable options for OwnCloud deployment. Additionally, you have the choice of using OwnCloud online, a SaaS platform with a German-hosted server.

In 2010, Frank Karlitschek offered it as a substitute for cloud service providers that offer business services.

The free program facilitates file transfers and acts as an interface for teamwork projects. OwnCloud is an open-source interface created by a number of developers. These programmers have frequently added new features in recent years. The client solution is a choice, particularly for private users. With their own apps, they can modify the software. As a result, ownCloud is also commonly used by this set of users.

Basically, a company’s staff members can utilize the cloud service as well. It allows for collaborative and concurrent document editing. Larger files may be stored with ease, and real-time information interchange is possible. The ownCloud server allows for the sharing of documents. Individual access privileges can be provided or limited for each person.

Update Your Rocky Linux 9|AlmaLinux 9 System

It is advised that you update your system and any accessible packages to the most recent versions before we start the installation:

Sudo dnf update

Step 1 – Install LAMP stack on Rocky Linux 9|AlmaLinux 9

By following the instructions in the guide below, you can install the LAMP stack on Rocky Linux 9|AlmaLinux 9.

LAMP Stack consists of:

  • Apache.
  • MySQL/MariaDB.
  • PHP

Follow the below guide to install Apache and MariaDB packages of the LAMP stack

Install PHP 7.4 on Rocky Linux 9|AlmaLinux 9

NOTE: Since [PHP 8.0] is not supported by the most recent version of Owncloud, you need to install [PHP 7.4] from the REMI repo:

sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm

Now activate PHP 7.4;

sudo dnf module reset php -y
sudo dnf module enable php:remi-7.4 -y

Install PHP 7.4 and the required modules with the command:

sudo dnf install httpd php php-{common,gmp,fpm,curl,intl,pdo,mbstring,gd,xml,cli,zip,mysqli} -y

Activate the httpd and fpm services. Execute the command below:

sudo systemctl enable --now httpd php-fpm

Check the status of php-fpm, it should be running;

$ systemctl status php-fpm
 php-fpm.service - The PHP FastCGI Process Manager
     Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
     Active: active (running) since Thu 2023-04-20 10:04:36 CEST; 7min ago
   Main PID: 6102 (php-fpm)
     Status: "Processes active: 0, idle: 5, Requests: 0, slow: 0, Traffic: 0req/sec"
      Tasks: 6 (limit: 23003)
     Memory: 14.9M
        CPU: 75ms
     CGroup: /system.slice/php-fpm.service
             ├─6102 "php-fpm: master process (/etc/php-fpm.conf)"
             ├─6103 "php-fpm: pool www"
             ├─6104 "php-fpm: pool www"
             ├─6105 "php-fpm: pool www"
             ├─6106 "php-fpm: pool www"
             └─6107 "php-fpm: pool www"

Apr 20 10:04:36 localhost.localdomain systemd[1]: Starting The PHP FastCGI Process Manager...
Apr 20 10:04:36 localhost.localdomain systemd[1]: Started The PHP FastCGI Process Manager.

Then verify the installation using the command :

$ php --version
PHP 7.4.33 (cli) (built: Feb 14 2023 09:05:10) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

Step 2 – Building an OwnCloud Database

Next, you must construct a database for OwnCloud. This will be useful for storing important files both during and after the installation.

Log in to the MariaDB database server:

sudo mysql -u root -p

Create a database, and user and assign privileges. You can change the database name, user, and password to match your preferences.

CREATE DATABASE cloud_db;
GRANT ALL PRIVILEGES ON cloud_db.* TO 'cloud_user'@'%'  IDENTIFIED BY 'myPassw0rd';
FLUSH PRIVILEGES;
EXIT

Step 3 – Install OwnCloud on Rocky Linux 9|AlmaLinux 9

Once the database is in place, navigate to OwnCloud’s download page and copy the link to the most recent archive file.

You can also do that with the below command:

wget https://download.owncloud.com/server/stable/owncloud-complete-latest.zip

Extract the packed files to /var/www/html/ as directed after downloading;

sudo unzip owncloud-complete-latest.zip -d /var/www/html/

Next, give the Apache user ownership of the OwnCloud directory.

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

Then, set the permissions as indicated.

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

Step 4 – Set up SELinux, Apache, and Firewall Rules

You must set up SELinux in the manner specified in order for the Paths to be reachable:

sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/owncloud(/.*)?"
sudo restorecon -Rvv /var/www/html/owncloud

Create the OwnCloud virtual host file.

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

Add the line below 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>

Restart the Apache web server;

sudo systemctl restart httpd

Allow HTTP and HTTPS through the firewall:

sudo firewall-cmd --permanent --zone=public --add-service=http 
sudo firewall-cmd --permanent --zone=public --add-service=https 
sudo firewall-cmd --reload

Last but not least, set up SELinux as follows.

 sudo setsebool -P httpd_unified 1

Step 5 – Access OwnCloud Web UI

We have finished setting up all the settings at this time. Accessing Owncloud with a browser is the following procedure. Visit the following URL http://server-ip/owncloud

By doing so, you are brought to the first screen where you must create an Admin account. Consequently, enter the username and password.

How to Install and Configure Owncloud on Rocky Linux 9|AlmaLinux 9

Then select “Storage & database” and enter the database user, database, and password in the appropriate fields of the form.

After clicking Finish setup, you will be taken to the login screen where you must enter the admin credentials you previously created.

You’ll see the dashboard below once you’ve authenticated.

You’re ready to go! You can share your files and folders from here, upload your own, and work together with other people.

Finale

There you have it. We’ve successfully guided you through setting up OwnCloud on Rocky Linux 9|AlmaLinux 9.

See more:

- Advertisment -

Recent posts

LEAVE A REPLY

Please enter your comment!
Please enter your name here