This is an old revision of the document!


ownCloud
Installation

Download the release key associated with the ownCloud software:

$ cd /tmp
$ ### wget http://download.opensuse.org/repositories/isv:ownCloud:community/xUbuntu_14.04/Release.key
$ wget -nv https://download.owncloud.org/download/repositories/9.0/Ubuntu_16.04/Release.key -O Release.key
$ apt-key add - < Release.key

Add the ownCloud repository as follows:

$ ### sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/xUbuntu_14.04/ /' >> /etc/apt/sources.list.d/owncloud.list"
$ sh -c "echo 'deb http://download.owncloud.org/download/repositories/9.0/Ubuntu_16.04/ /' >> /etc/apt/sources.list.d/owncloud.list"

Update the package database and install ownCloud:

$ apt-get update
$ apt-get install owncloud
Configuration

Install Mariadb (or Mysql) to get the configurations as follows:

$ sudo apt-get install mariadb-server

It will ask for password input, just enter your desired password there.

We will be configuring our ownCloud server to take advantage of the more robust MySQL database instead of the SQLite default implementation. To do so, we must configure MySQL first as:

$ sudo mysql -u root -p

Put the mariadb password which you selected before, & create a database for ownCloud in Mariadb prompt:

mariadb> CREATE DATABASE owncloud;

Assign privileges to a new MySQL user to handle database operations for ownCloud:

mariadb> GRANT ALL ON owncloud.* to 'owncloud'@'localhost' IDENTIFIED BY 'database_password';
mariadb> exit

Edit config/config.php and add trusted_domains:

<?php
$CONFIG = array (
  ...
  'trusted_domains' =>
    array (
      0 => 'www.example.com',
      1 => 'example.com',
    ),
  ...
);

Open browser and visit domain name such as http://www.example.com/owncloud.

References