How To Install OwnCloud On CentOS Linux?


I need some application that will provide online file sharing and synchronization. It should be free. Open Source solution is preferred. It seems that we will install OwnCloud which is is an open source, self-hosted file sync and share app platform. There are a lot of things like calendar sync, active feed notifications etc. but for now we will just install ownCloud.

Get Repository Keys and Add Repository

We need to add ownCloud repository keys and repository into our yum repository database.

$ sudo rpm --import https://download.owncloud.org/download/repositories/stable/CentOS_7/repodata/repomd.xml.key
  • We use rpm –import to import ownCloud repository keys
$ sudo curl -L https://download.owncloud.org/download/repositories/stable/CentOS_7/ce:stable.repo -o /etc/yum.repos.d/ownClou
d.repo 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current 
                                 Dload  Upload   Total   Spent    Left  Speed 
100   265  100   265    0     0    634      0 --:--:-- --:--:-- --:--:--   633
  • Get repository infor with curl -L 
  • Save repository info into /etc/yum.repos.d with -o 

Install ownCloud Packages

We have added OwnCloud in the previous steps. Now we will install it with yum package manager. We can also use dnf package manager if we want.

$ sudo yum install owncloud

OR

$ sudo dnf install owncloud

Install Mariadb, Apache and Php

OwnCloud uses SQlite as default database but it is not convenient for dens usage. We can optionally install MariaDB.  OwnCloud web interface is developed in php so we need to install php. To run php web application we use Apache Web Server of httpd.

$ sudo yum install mariadb-server httpd php5 -y

We will start MariaDB service like below

$ sudo systemctl start mariadb

Database Configuration

If we will use MariaDB as database server we need to make some configuration like creating database.

$ sudo mysql -u root                     
Welcome to the MariaDB monitor.  Commands end with ; or \g. 
Your MariaDB connection id is 2 
Server version: 5.5.50-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. 
  • Login database console. We will use MySQL tools to operate.
MariaDB [(none)]> CREATE DATABASE owncloud; 
Query OK, 1 row affected (0.00 sec)
  • Create database name owncloud
MariaDB [(none)]> GRANT ALL ON owncloud.* to 'owncloud'@'localhost' IDENTIFIED BY 'set_database_password'; 
Query OK, 0 rows affected (0.00 sec)
  • Create new user named own cloud and give privilege to access owncloud database
MariaDB [(none)]> FLUSH PRIVILEGES; 
Query OK, 0 rows affected (0.00 sec)
  • Write changes to the database instantly
MariaDB [(none)]> exit 
Bye
  • See you MariaDB
LEARN MORE  Linux Print History Command Without Line Numbers

Login OwnCloud Web Interface

Create new user by providing username and password. By default Sqlite database is used but if you want use MariaDB created upper chapter.

 

Login OwnCloud Web Interface
Login OwnCloud Web Interface

OwnCloud Panel

As we can see from following screenshot that OwnCloud Panel lists current root files and folders. By default Documents and Photos folders are provided. There is also an PDF file which contains detailed ownCloud Manual.

OwnCloud Panel
OwnCloud Panel

 

How To Install OwnCloud On CentOS Linux? Infografic

How To Install OwnCloud On CentOS Linux? Infografic
How To Install OwnCloud On CentOS Linux? Infografic

Leave a Comment