Introduction to ownCloud
In today’s digital world, secure storage, collaboration, and sharing of files have become essential for businesses. ownCloud, a self-hosted open-source file server, provides a reliable solution for storing, accessing, and sharing files, calendars, contacts, and other data across multiple devices. With ownCloud, you can easily synchronize your files between devices and share them with others, ensuring seamless collaboration and productivity.
Prerequisites
Before we dive into the installation process, make sure you have the following prerequisites in place:
- LAMP Stack: Ensure that the LAMP stack (Linux, Apache, MySQL/MariaDB, PHP) is installed and running on your AlmaLinux 8 server. If you need guidance on installing the LAMP stack, refer to thisinstructional guide.
- PHP Modules: ownCloud requires additional PHP modules to work seamlessly. Install the necessary modules by running the following command in your terminal:
yum install php-curl php-gd php-intl php-json php-ldap php-mbstring php-mysqlnd php-xml php-zip php-opcache
Setting up the Database
To ensure proper data management, you need to create a database and a user for ownCloud. Follow the steps below to set up the database:
- Access MariaDB: Log in to the MariaDB database using the following command:
mysql -u root -p
- Create Database: Create a database for ownCloud by executing the following command:
CREATE DATABASE owncloud_db;
- Create User: Create a user and grant necessary permissions on the ownCloud database. Replace
Enter-A-Password-Here
with a strong and secure password of your choice:
GRANT ALL ON owncloud_db.* TO 'owncloud_user'@'localhost' IDENTIFIED BY 'Enter-A-Password-Here';
- Flush Privileges: After creating the user and database, flush the privileges and exit the MariaDB database:
FLUSH PRIVILEGES; EXIT;
Installing ownCloud
Now that the prerequisites are met and the database is set up, let’s proceed with the installation of ownCloud on AlmaLinux 8.
- Download ownCloud: Use the following command to download the ownCloud package:
wget https://download.owncloud.org/community/owncloud-complete-20201216.tar.bz2
- Extract the Package: Extract the downloaded package into the
/var/www/
directory with the following command:
tar -jxf owncloud-complete-20201216.tar.bz2 -C /var/www/
- Set Permissions: Grant permission to the Apache webserver to access the ownCloud files:
chown -R apache: /var/www/owncloud
- Configure Apache: Create a configuration file for ownCloud to be served by the Apache webserver:
vi /etc/httpd/conf.d/owncloud.conf
Add the following lines to the configuration file, then 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 Apache: Restart the Apache webserver to apply the changes:
systemctl restart httpd
Verify the status of the webserver using the following command:
systemctl status httpd
- Check SELinux Status: Check if SELinux is enabled and running by executing the command:
sestatus
If SELinux is enabled, allow the Apache webserver to write to ownCloud’s directory with the following command:
setsebool -P httpd_unified1
Congratulations! ownCloud is now successfully installed on your AlmaLinux 8 server. Let’s proceed to the final steps to complete the setup.
Finalizing the ownCloud Setup
- Access ownCloud: Open your preferred web browser and enter the following URL:
http://server-ip/owncloud
- Create Account: On the ownCloud login page, enter your desired username and password to create an account.
- Storage and Database: After logging in, click on “Storage & Database” and select “MySQL/MariaDB”.
- Database Details: Fill in the database details, including the database user, password, and database name.
- Finish Setup: Click the “Finish Setup” button to complete the ownCloud setup.
Once the setup is completed successfully, you will be redirected to the ownCloud dashboard. From here, you can explore various options to install ownCloud apps on different platforms for seamless file synchronization and collaboration.
Conclusion
In this comprehensive guide, we have walked you through the process of installing ownCloud on AlmaLinux 8. By following the step-by-step instructions, you now have ownCloud up and running on your server, empowering you with secure storage, collaboration, and file sharing capabilities.
If you encounter any difficulties during the installation process or need further assistance, don’t hesitate to reach out to Shape.host via a Support Ticket. Shape.host is a trusted provider of Linux SSD VPS and cloud hosting solutions, ensuring reliable and scalable infrastructure for your business needs.