ownCloud is a free and open-source software that provides a secure and convenient way to store, share, and access files and data from anywhere in the world. With ownCloud, you can have your own personal cloud server and enjoy the benefits of having your data stored in a secure and accessible location. In this article, we will guide you through the process of installing ownCloud 10 on CentOS/RHEL 9/8.
CentOS/RHEL 9/8 are popular Linux distributions that are widely used as a server operating systems. By following this guide, you can easily set up your own personal cloud server using ownCloud 10 and CentOS/RHEL 9/8.
- A server with CentOS/RHEL 9/8 installed and access to the root user or a user with administrative privileges
- A minimum of 2 GB of RAM is recommended
- A minimum of 1 GB of storage space is recommended
Step 1: Update the System
Before installing any new software, it is recommended to update the system by running the following command:
sudo yum update
Step 2: Install Apache and MariaDB
To set up ownCloud you must have running LAMP server on your CentOS 8 system. If you already have running LAMP stack skip this step else use the following commands to install it.
- Install Apache2:
sudo dnf install httpd
- Install and Secure MariaDB:
sudo dnf install mariadb-server
Use this tutorial for the complete MySQL installation steps on CentOS 8.
- Installing PHP:
Let’s start with the installation of PHP 5.6 or a higher version.
sudo dnf install php php-gd php-curl php-zip php-dom php-xml php-simplexml php-mbstring php-intl php-json
Step 3: Download ownCloud Source
After successfully configuring the lamp server on your system, Let’s download latest ownCloud from its official website.
Next, extract the downloaded archive under the website document root and set up appropriate permissions on files and directories.
sudo tar xjf owncloud-complete-latest.tar.bz2
sudo mv owncloud /var/www/
sudo chown -R apache:apache /var/www/owncloud
sudo chmod -R 755 /var/www/owncloud
ownCloud keep its data under a separate directory. We suggest keeping this outside of the ownCloud application directory. So create a directory like below, and set proper permission to allow the webserver to write files.
mkdir -p /var/owncloud/data
sudo chown -R apache:apache /var/owncloud/owncloud
sudo chmod -R 755 /var/owncloudowncloud
Step 4: Create MySQL User and Database
After extracting code, let’s create a MySQL database and user account for configuring ownCloud. Use the following set of commands to log in to the MySQL server and create a database and user.
mysql -u root -pEnter password:
CREATE DATABASE owncloud;
CREATE USER 'owncloud'@'localhost' IDENTIFIED BY '_password_';
GRANT ALL ON owncloud.* to 'owncloud'@'localhost';
Step 5: Configure Apache
Now, create an Apache configuration file and set up owncloud alias. This will allow us to access ownCloud as a sub-directory URL.
Create and edit file:
sudo vim /etc/httpd/conf.d/owncloud.conf
Add the below content:
Save and close the file. Then restart the Apache service to reload the configuration file.
sudo systemctl restart httpd
Step 6: Run ownCloud Web Installer
Open your web browser and visit the URL http://your-server-ip/owncloud to access the ownCloud web interface. You will be prompted to enter the MariaDB database information and the admin account information. Fill in the required information and click on the “Finish Setup” button.
Enter new admin credentials to create an admin account and provide the location of the data folder.
Now slide your page down and input the database credentials and click on Finish Setup.
After completing the setup you will get the admin dashboard. Where you can create a user, and groups, assigned them permissions, etc.
Congratulations! You have successfully installed ownCloud 10 on CentOS/RHEL 9/8. You can now start uploading and sharing files and data with your own personal cloud server.
In conclusion, installing ownCloud 10 on CentOS/RHEL 9/8 is a straightforward process that requires basic Linux administration skills. With ownCloud, you can have a secure and convenient way to store, share, and access your files and data from anywhere in the world.