Install OwnCloud 8 on CentOS 7 / RHEL 7

ADVERTISEMENT

ownCloud Logo

ownCloud is a web suite that provides a cloud storage over the network, data can be uploaded via web browser or using software client. Data will be stored on the server and can be downloaded or access any time with browser or desktop client or smart phone app.

ADVERTISEMENT
Article will continue after the ad

ownCloud is based on PHP and a SQLite, MySQL, Oracle or PostgreSQL database, so it can run on all platforms that meet these requirements. It provides almost all possibility of functions that are available on commercial suites; it is released under AGPLv3 license, so you can setup own cloud storage server without any additional cost.

Commercial version of ownCloud is also available.

Features:

What’s new in ownCloud 8:

  • It is now easier to keep ownCloud updated with the channel of your choice via the built-in Updater app and our package repositories.
  • ownCloud Server 8.1 brings much improved performance in the areas of syncing, file operations and dealing with parallel requests.
  • To make ownCloud easier to use, documentation has been massively improved and integrated in the interface.

The following are the list of features available on ownCloud.

  • Mobile and Desktop Syncing
  • Share With Anybody
  • External Storage
  • Encryption and Security
  • Versioning and Undelete
  • Activity Feed
  • Calendars and Contacts
  • Collaborative Editing
  • Galleries
  • Play Music, Watch Movies, Store Passwords

More here.

Here is the small guide to setup ownCloud 8 on CentOS 7 / RHEL 7.

Prerequisites:

As mentioned earlier, it is based on PHP and database combination, database can be any of from SQLite, MySQL, Oracle or PostgreSQL database. For demo purpose, i am going to use MariaDB as a database with ownCloud on CentOS, we will talk about reason behind later.

yum -y install wget mariadb-server php-mysql

Download and Setup:

ownCloud provides the official packages for setting up it, configure ownCloud repository using following command.

### CentOS 7 ###

cd /etc/yum.repos.d/
wget http://download.opensuse.org/repositories/isv:ownCloud:community/CentOS_7/isv:ownCloud:community.repo
yum install owncloud

### RHEL 7 ###

cd /etc/yum.repos.d/
wget http://download.opensuse.org/repositories/isv:ownCloud:community/RedHat_RHEL-7/isv:ownCloud:community.repo
yum install owncloud

Allow apache in firewall.

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

Allow the web server to read and write the files on ownCloud directory.

chown -R apache.apache /var/www/html/owncloud/

Start Apache and MariaDB.

systemctl start httpd.service
systemctl start mariadb.service

Auto start the service at system start-up.

systemctl enable httpd.service
systemctl enable mariadb.service

Create Database:

If you are setting up a MariaDB for the first time, here is the tutorial on Securing MariaDB. MariaDB server must be started before creating the database, login to MySQL server.

mysql -u root -p

Create database called “clouddb”

create database clouddb;

Allow “clouddbuser” to access the “clouddb” database on localhost with predefined password.

grant all on clouddb.* to 'clouddbuser'@'localhost' identified by 'password';

SELinux:

Set SELinux to allow OwnCloud to write the data.

semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/data'
restorecon '/var/www/html/owncloud/data'
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/config'
restorecon '/var/www/html/owncloud/config'
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/apps'
restorecon '/var/www/html/owncloud/apps'

Setup ownCloud:

Open up web browser, point a URL to http://your-ip-address/owncloud. Browser will take you to ownCloud setup page where it must be configured before going to live.

Enter admin user name, password, data folder location and database details.

You can choose any one of the database from SQLite or MySQL. If you choose SQLite database, you do not have to enter database details. where as MySQL database requires database user, password and database name.

Install OwnCloud 8 on CentOS 7 - Setup
Install OwnCloud 8 on CentOS 7 – Setup

Alternately you can download ownCloud client to upload the files.

Install OwnCloud 8 on CentOS 7 - Apps
Install OwnCloud 8 on CentOS 7 – Apps

Home page will look like this, you can start uploading the contents using upload button.

Install OwnCloud 8 on CentOS 7 - Home Page
Install OwnCloud 8 on CentOS 7 – Home Page

Extra’s:

The default maximum file size for uploads is 512MB. You can increase this limit by editing .htaccess file.

vi /var/www/html/owncloud/.htaccess

Modify the below entries.

php_value upload_max_filesize 513M
php_value post_max_size 513M

That’s All!.

ADVERTISEMENT

POSTS YOU MAY LIKE -:)

Share This Post

  • Rafael

    Hello Raj, first of all, thank you very much for doing this tutorial. Now, I’m fairly new to CentOS but I’m trying to install OwnCloud on a VM with CentOS on it. My concern is that it won’t let me run the yum command to try to install MariaDB, it says it had an error downloading packages and there are no more mirrors left to try. Would you happen to know the reason behind this? And/or recommend me a tutorial for trying to fix it? Thank you very much in advance.

    • If you are using VMware workstation, set your network card of VM in NAT so that you can get internet from the host machine

    • Andrei Popa

      This may be to late but just in case someone finds this useful, you can use either NAT or Bridged mode as long as you configured the IP correctly. Just don’t forget to setup the DNS too. I use google DNS 8.8.8.8 / 8.8.4.4 in all my network configs and I haven’t ran into any issues with yum not being able to connect to repos.

      Regards.

  • Andrei Popa

    Thank you for the guide. One of the few to include Selinux in the process.

    Regards.

  • Achmad Sutanto

    wget http://download.opensuse.org/repositories/isv:ownCloud:community/CentOS_7/isv:ownCloud:community.repo

    wget: unable to resolve host address ‘download.opensuse.org’

    Any update?

  • Neale

    If I installed Owncloud in a Centos7 virtual machine (say VM internal IP 192.168.122.10) in a Centos7 host, how can the outside world access the Owncloud (http://192.168.122.10/owncloud) ?

  • fraber

    I got problems with “yum install owncloud-postgresql”, I get “Error: … Requires: owncloud=8.0.10-1.el7, Installed: owncloud-8.1.5-15.1.noarch …”. So I guess the repository you mentioned above has some faulty dependeny? Unfortunately there is no –force in yum. Any idea how to fix this?

  • Brian Cowden

    Anyone who is looking to install ownCloud on an Ubuntu server may find this article useful:

Shares