Tyler Voll

Writer - System Admin

Today I went through the process of installing Owncloud 10 on CentOS 7. Although there were already a few guides out on the subject, I found some to be rather outdated, having me install versions of PHP that were no longer supported by the newest version of OwnCloud.

For those who haven't heard of OwnCloud before, think of services such as Dropbox and Google Drive, which allow you to store your files online for easy access from all your devices. OwnCloud operates similarly, but is open-source, so you can host the service straight from your own server!


Step 1 -- Enable EPEL/REMI Repository

### CentOS/RHEL 7 ###
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rp

Step 2 -- Install the LAMP Stack

The LAMP Stack includes Apache, MariaDB, and PHP 5.6 - 7.0 on top of Linux. For this installation, we will be installing PHP 7.0. If you already have the LAMP Stack running on your system, you should be able to skip this step.

First thing that I'd recommend installing is yum-utils. It helps manage yum repositories and packages.

# yum install yum-utils

After doing this, you can tell the Remi repository which PHP version you'd like to install.

# yum-config-manager --enable remi-php70   [Install PHP 7.0]

Then you can install PHP 7.0 with all necessary modules with the command below.

Along with that, Yum should also install Apache as a dependency.

# yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo php-dom php-XMLWriter php-XMLReader php-mb php-mbstring

It's also a good step to enable the Apache and MariaDB service to start on boot.

# sudo systemctl enable httpd.service

# sudo systemctl enable mariadb.service

Step 3 -- Download & Extract OwnCloud

 Next, we will download the OwnCloud Archive and extract it into the web document root.

After that, we will give the appropriate permissions on files and directories, and then remove the archive file.

# cd /var/www/html
# wget https://download.owncloud.org/community/owncloud-10.0.7.tar.bz2
# tar xjf owncloud-10.0.7.tar.bz2
# chown -R apache.apache owncloud
# chmod -R 755 owncloud
# rm -f owncloud-10.0.7.tar.bz2

Step 4 -- Create MySQL Database and User

 First thing to do is make sure you go through the secure installation of MariaDB/MySQL.

# /usr/bin/mysql_secure_installation

Next step is to create a user account for configuring Owncloud, along with a database for the service.

# mysql -u root -p
Enter password:

mysql> CREATE DATABASE owncloud;
mysql> GRANT ALL ON owncloud.* to 'owncloud'@'localhost' IDENTIFIED BY '_password_';
mysql> quit

Step 5 -- Install OwnCloud within the Web Installer

 After all of this has been done. You can visit your owncloud page and go through the web installer. The installer will ask for information regarding your admin account's username/password, along with the information needed to point to your MySQL/MariaDB Database.


After going through that setup, you can now use Owncloud on your network! You can connect to the IP address of your server and upload your own files to be shared with others locally.

OwnCloud Dashboard

Back to Top