How to Install OwnCloud on CentOS 7

r00t August 21, 2017

Install OwnCloud on CentOS 7

In this tutorial we’ll learn how to install Owncloud on CentOS 7. We will also install and configure its prerequisites. Owncloud is a file synchronization and collaboration platform that can run on your own server. Featuring a nice web interface, clients for all major operating systems, and standards-compliant use of APIs and protocols, Owncloud can replace many popular cloud services with a solution that respects autonomy and privacy.

I recommend to use a minimal Ubuntu server setup as a basis for the tutorial, that can be a virtual or a root server image with an CentOS 7 minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.

Install OwnCloud on CentOS 7

Step 1. First, ensure your system is fully up-to-date by running the following:

yum -y update

Step 2. Installing LAMP on CentOS 7.

You should check out this LAMP stack install tutorial for CentOS 7, if you haven’t installed LAMP yet. Once it’s installed, come back here and read on. We also will install the required packages for LAMP stack and the important PHP extension that Laravel relies on:

yum install php70w php70w-dom php70w-mbstring php70w-gd php70w-pdo php70w-json php70w-xml php70w-zip php70w-curl php70w-mcrypt

Step 3. Installing OwnCloud.

Download ownCloud from official website or enter the following command on terminal:


Now extract downloaded archive and setup appropriate permissions on files and directories:

cd /var/www/html
tar xjf ~/Downloads/owncloud-10.0.0.tar.bz2
chown -R apache.apache owncloud
chmod -R 755 owncloud

Step 4. Configure Database for NextCloud.

Next, we need to create a database for the OwnCloud installation:

mysql -uroot -p

Run the following command to create a database for OwnCloud:

MariaDB> CREATE DATABASE owncloud;
MariaDB> CREATE USER 'cloud'@'localhost' IDENTIFIED BY 'cloudpassword';
MariaDB> GRANT ALL PRIVILEGES ON owncloud.* TO 'cloud'@'localhost';
MariaDB> exit

Step 5. Configure Firewall for Owncloud.

Allow apache in firewall:

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

Step 6. Accessing OwnCloud Web Installation.

Now you can access the OwnCloud web install wizard in your browser by entering the domain name or http://your_ip/owncloud/ to continue your OwnCloud installation. Start by creating your username and password. Not only will this user be able to sync files and store contacts, but it will also have administrative privileges for Owncloud itself.

Congratulation’s! You have successfully install and configured Owncloud on your CentOS 7 server.

The Tags:

Leave a Comment

Comments are closed.