How to Install ownCloud on AlmaLinux 8

ownCloud is a self-hosted open source file server that enables secure storage, collaboration, and sharing. ownCloud lets you access your files, calendar, contacts, and other data and they are available on any device and can be shared with a few clicks. You can synchronize everything between your devices and share files with others.

Prerequisites

  • LAMP stack should be installed and running, Click here for Instruction to Install LAMP stack on the server.

Currently ownCloud supports PHP 7.4 or PHP 7.3.

Installing Required PHP Modules

For OwnCloud to work seamlessly some additional PHP modules are required, let's install them with the following command,

yum install php-curl php-gd php-intl php-json php-ldap php-mbstring php-mysqlnd php-xml php-zip php-opcache

Create a Database for ownCloud

Command to login MariaDB database.

mysql -u root -p

Create a database for ownCloud.

CREATE DATABASE owncloud_db;

Create a User and grant permissions on the nextcloud-db database,

Note: Replace Enter-A-Password-Here with a strong and secure password.

GRANT ALL ON owncloud_db.* TO 'owncloud_user'@'localhost' IDENTIFIED BY 'Enter-A-Password-Here';

After creating user and database for ownCloud Flush Privileges and exit the MariaDB database.

FLUSH PRIVILEGES;

EXIT;

Installing ownCloud

Enter the following command to Download the ownCloud.

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

Extract into the /var/www/ directory with the following command,

tar -jxf owncloud-complete-20201216.tar.bz2 -C /var/www/

To enable permission for Apache webserver to access the ownCloud files.

chown -R apache: /var/www/owncloud

Create a configuration file for ownCloud for Apache webserver to serve ownCloud.

Vi /etc/httpd/conf.d/owncloud.conf

Add the following lines to the configuration file and save and exit.

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>

Restart the apache webserver to reflect the changes,

systemctl restart httpd

Command to check the status for Webserver

systemctl status httpd

Command to check if SELinux is enabled and running

sestatus

Output:

[root@server ~]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Memory protection checking:     actual (secure)
Max kernel policy version:      32

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

setsebool -P httpd_unified 1

ownCloud is successfully installed, open the ownCloud on the browser and complete the final steps.

URL to open the ownCloud on web browser.

http://server-ip/owncloud

In browser,

  • Enter Username and Password to create account.
  • Next click on Storage and Database and select MySQL/MariaDB
  • Fill in all the database details i.e database user, password, and database name.
  • And click the Finish Setup button to complete the setup.

Output:

Once the Setup is completed successfully, Login Page will appear and enter the Username and Password that you specified earlier to get access.

Output:

After login, you will be presented with options for installing the ownCloud app on different platforms and this is what the dashboard looks like

This Concludes how you install ownCloud on AlmaLinux 8.

If you can not configure and face any technical difficulties, kindly reach out to us via Support Ticket.


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS