In today’s digital age, secure storage and seamless access to files are crucial for businesses. OwnCloud, an open-source project, offers a reliable solution to securely store, access, share, and collaborate on files. In this guide, we will walk you through the process of installing and configuring OwnCloud on Rocky Linux 8, empowering you to effectively manage your data from anywhere, on any device.
Prerequisites
Before we begin, ensure that you have either a LAMP (Linux, Apache, MySQL, PHP) or LEMP (Linux, Nginx, MySQL, PHP) stack installed and running on your server or home computer. If you haven’t set up the stack yet, you can follow our detailed guides on how to install and configure LAMP Stack and LEMP Stack.
Updating Your System
To start the installation process, it is essential to ensure that your system is up to date with the latest packages and security patches. Open your terminal and run the following command to update your system:
yum update -y
Downloading OwnCloud
To download the latest version of OwnCloud, visit the official OwnCloud website and navigate to the downloads section. Once there, copy the download link for the latest stable release.
In your terminal, navigate to the temporary directory using the following command:
cd /tmp
Next, use the wget
command to download the OwnCloud tar file:
wget https://download.owncloud.com/server/stable/owncloud-complete-latest.tar.bz2
Once the download is complete, extract the OwnCloud tar file to the /var/www/html/
directory using the following command:
yum install bzip2 tar -xvf owncloud-complete-latest.tar.bz2 -C /var/www/html/
Setting Permissions
In order for OwnCloud to function properly, we need to set the correct permissions. Use the following commands to set the ownership and permissions for the OwnCloud directory:
chown apache:apache -R /var/www/html/owncloud/ chmod -R 755 /var/www/html/owncloud
Creating a MySQL Database
OwnCloud requires a MySQL database to store its data. Follow the steps below to create a new MySQL database and user:
- Login to your MySQL server using the following command:
mysql -u root -p
- Once logged in, create a new database for OwnCloud:
CREATE DATABASE ownclouddb;
- Create a new user and grant all privileges to the user for the OwnCloud database:
GRANT ALL PRIVILEGES ON ownclouddb.* TO 'ownclouduser'@'localhost' IDENTIFIED BY 'YOUR-PASSWORD' WITH GRANT OPTION;
Make sure to replace YOUR-PASSWORD
with a strong password of your choice.
- Flush the privileges and exit the MySQL shell:
FLUSH PRIVILEGES; exit;
Configuring Firewall and SELinux
To allow access to OwnCloud through the firewall, open the Apache port using the following commands:
firewall-cmd --zone=public --add-port=80/tcp --permanent firewall-cmd --reload
Next, we need to update the SELinux configuration to allow the Apache web server to write to the OwnCloud directory. Run the following command to set SELinux mode to permissive:
setenforce 0
Now, open the SELinux configuration file using your preferred editor:
vi /etc/selinux/config
Locate the following lines in the file and update them as shown:
SELINUX=permissive SELINUXTYPE=targeted
Save and exit the file.
Finally, execute the command below to allow the Apache web server to write to OwnCloud’s directory:
setsebool -P httpd_unified1
Completing the OwnCloud Installation
It’s time to complete the OwnCloud installation. Open a web browser and type your server’s IP address followed by /owncloud
in the URL bar. For example, http://server_IP/owncloud
.
You will be prompted to create an admin account for OwnCloud. Enter the desired username and password, and click on the “Finish setup” button.
Congratulations! You have successfully installed and configured OwnCloud on Rocky Linux 8. You can now securely store, access, and collaborate on your files, empowering your team to work efficiently from anywhere, on any device.
Conclusion
In this guide, we have walked you through the step-by-step process of installing and configuring OwnCloud on Rocky Linux 8. By following these instructions, you now have a powerful and secure platform for storing, accessing, and collaborating on files. OwnCloud empowers businesses to work efficiently and effectively in today’s digital world.
To further enhance your cloud hosting experience, consider exploring Shape.host’s Linux SSD VPS services. With Shape.host, you can enjoy reliable and scalable cloud solutions tailored to your specific needs. Shape.host is committed to delivering efficient, secure, and high-performance hosting services to help businesses thrive in the digital landscape.