How to install Owncloud 10 on CentOS 7.3 Server

CentOS Tutorial – Hello everyone, today we will learn how to install Owncloud 10 on CentOS 7.3 Server. Owncloud 10 has been released a while ago with many improvements, better security and some additional features. Its pretty easy to install Owncloud on CentOS 7.3.

What you need

  • root access to the server
  • LAMP stack is installed on your server

On this tutorial I use the following system

  • OS: CentOS 7.3
  • Kernel version 3.10.0
  • IP address:

Steps to install Owncloud 10 on CentOS 7.3

Step 1. Install LAMP

Please refers to my previous tutorial to install LAMP Stack on CentOS 7.3. Make sure your web server, MariDB database and PHP working properly before proceeding to the next step.

Step 2. Create new Owncloud database and user

Now we need to create a new database and user for our Owncloud installation.

[root@localhost ~]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.52-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> CREATE DATABASE owncloud;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> CREATE USER 'owncloud'@'localhost' IDENTIFIED BY '12345678';
Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' IDENTIFIED BY '12345678';
Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> EXIT;

Step 3. Download Owncloud

First, install wget tool if you don’t have it already

yum install wget unzip

Now download wget to temporary folder /tmp

cd /tmp

Extract the file


The command above will produce a new directory called owncloud. We can now move this directory contents to /var/www/html and we need to change the permission to this directory.

cp -r owncloud/. /var/www/html/
chown -R apache:apache /var/www/html/*

Step 4. Configure PHP (in case you have older version prior to version 5.6.0)

Now open a web browser and type your server IP address to start configure Owncloud 10. In my case I got the following error message on my web browser:

This version of ownCloud requires at least PHP 5.6.0
You are currently running 5.4.16. Please update your PHP version.

This means that I have PHP 5.4.16 installed and Owncloud need a newer version of PHP. So, I will need to remove current PHP and install the new one. To install PHP 5.6.x on CentOS 7, you can follow this tutorial, or I can summarized it down below.

Install EPEL and Remi Repo on CentOS 7

rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm

Enable Remi repository

nano /etc/yum.repos.d/remi-php71.repo

Now find the following sections and change to “enabled=1”

name=Remi's PHP 7.1 RPM repository for Enterprise Linux 7 - $basearch

name=Remi's PHP 7.1 RPM repository for Enterprise Linux 7 - $basearch - debuginfo

Now we can install PHP

yum install php php-mysql php-mcrypt php-gd php-zip php-dom php-mbstring php-xml

Step 5. Configure Owncloud

Now open web browser and type the Owncloud server IP address as follow:


You will see the Owncloud configuration page.

Enter the MySQL username, password and database name. Set the SELinux to permissive otherwise you will get the following error:

You don’t have permission to access /owncloud/index.html on this server.

Execute this command to set the SELinux to Permissive

setenforce 0



1 Trackback / Pingback

  1. CentOS Tutorial - How to install PHP 7 on CentOS 7.3

Leave a Reply

Your email address will not be published.