Installing Owncloud in ubuntu 15.04


Here I have installed owncloud under owncloud user


Owncloud Need below applications to run successfully

  1. Apache
  2. Php
  3. Mysql ( To deploy OwnCloud for large scale I have used here mysql instead of SQlite which we use it  for 15-20 users  )


Dependencies needed by Owncloud with Apache,php and Mysql and  ubuntu.

#apt-get install php5-gd  libcurl3 libcurl4-openssl-dev php5-curl  php5-gd openssl  git libpng-dev libjpeg-dev php5-json  curl libcurl3 libcurl3-dev php5-mcrypt  libldb-dev libpng12-dev libcurl4-openssl-dev smbclient mcrypt php5-mcrypt libmcrypt-dev

#apt-get build-deps php5 apache2

#apt-get install build-essential

Compiling Apache

$wget http://mirror.fibergrid.in/apache//httpd/httpd-2.4.18.tar.gz

$ tar -zxvf httpd-2.4.18.tar.gz

$ cd httpd-2.4.18/

$./configure –prefix=/home/owncloud/apache –enable-so –enable-so –enable-rewrite –enable-ssl

$make clean


$make install


Compiling PHP

$wget http://in1.php.net/get/php-5.6.0.tar.bz2/from/this/mirror

$tar -zxvf mirror

$cd php-5.6.0/

$ ./configure –with-apxs2=/home/owncloud/apache/bin/apxs –prefix=/home/owncloud/apache/php –with-config-file-path=/home/owncloud/apache/php –with-mysql –without-iconv –with-gd –with-jpeg-dir  –with-png-dir –enable-zip –enable-gd-native-ttf –with-zlib –with-curl –with-pdo-mysql –with-mysqli –enable-mbstring –enable-calendar –with-mcrypt –with-openssl –with-zlib –with-ldap –enable-ftp


( while compiling with ldap we may get error fix it with below )

ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/

$make clean


( Make may not work so comment below line in Makefile and add this line.

EXTRA_LIBS = -lcrypt -lz -lresolv -lcrypt -lpq -lrt -lpq -lpng -lz -ljpeg -lcurl -lrt -lm -ldl -lnsl -lxml2 -lzlcurl -lxml2 -lz -lm -lxml 2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypto -llber

$make install

After the installation is complete we need to copy the php.ini-production to /home/owncloud/apache/php/php.ini and do changes in http.conf to support php


$owncloud@owncloud:~/downloads/php-5.6.0$ cp -p php.ini-production ~/apache/php/php.ini

$owncloud@owncloud:~/downloads/php-5.6.0$ cp -p ./libs/libphp5.so ~/apache/modules/


Installation of Mysql Server

#apt-get install mysql-server


Download owncloud and extract it in /htdocs


#wget https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2


Link  http://localhost:8090/owncloud


Mysql configuration for owncloud.


owncloud@owncloud:~$ mysql -uroot -p

mysql> create database owncloud;

mysql> CREATE USER ‘owncloud’@’localhost’ IDENTIFIED BY ‘password’;

mysql> GRANT ALL PRIVILEGES ON * . * TO ‘owncloud’@’localhost’;

mysql> flush privileges;


By default owncloud uses SQlite  database to migrate from SQlite  to mysql just setup mysql for owncloud and run the below command


$php occ db:convert-type –port=”3306″ –password=”test1″ –all-apps mysql owncloud owncloud


Config.php entry of Owncloud  look like this.


owncloud@owncloud:~/apache/htdocs/owncloud/config$ cat config.php


owncloud@owncloud:~/apache/htdocs/owncloud/config$ cat config.php


$CONFIG = array (

 ‘instanceid’ => ‘occdbfpby2ap’,

 ‘passwordsalt’ => ‘xPFiSJhmqfutxmu5bbukfzLSGBtkj3’,

 ‘secret’ => ‘fGYmfBa+eQk0jca5PX4QrmtZTMpK+JKG2BqnKrz0zU0IhfT2’,

 ‘trusted_domains’ =>

 array (

0 => ‘’,


 ‘datadirectory’ => ‘/home/owncloud/data’,

 ‘overwrite.cli.url’ => ‘;,

 ‘dbtype’ => ‘mysql’,

 ‘version’ => ‘’,

 ‘logtimezone’ => ‘UTC’,

 ‘installed’ => true,

 ‘maintenance’ => false,

 ‘dbname’ => ‘owncloud’,

 ‘dbhost’ => ‘’,

 ‘dbuser’ => ‘owncloud’,

 ‘dbpassword’ => ‘ozocom’,

 ‘ldapIgnoreNamingRules’ => false,

 ‘mail_from_address’ => ‘ops’,

 ‘mail_smtpmode’ => ‘smtp’,

 ‘mail_domain’ => ‘zedo.com’,

 ‘mail_smtphost’ => ‘smtp.bb.zedo.com’,

 ‘mail_smtpport’ => ’25’,



Tuning Done in php,apache and mysql to run owncloud smoothly

  1. Changes is done in php to upload larger file beyond 2MB which it accepts by default. We have done changes in php.ini file line upload_max_filesize and post_max_size, and increase the limit to a desired value. Ideally, these values should be almost same, with post_max_size being slightly higher than upload_max_filesize, because there is header information in the posted files.
  2. Also if we see a lot of execution time outs, then we should increase max_execution_time and max_input_time to an appropriate value.


Usage of ownCloud


Usage of ownCloud and its Apps

  1. It contains the plugins or say apps with enhance the functionality of owncloud. We can see a list of available apps, along with the ones that are activated, by clicking on the drop-down list from the upper-left corner, and then selecting Apps from the menu.


Basic usage of ownCloud along with some very common apps

  1. Uploading a file ( + symbol you can see on owncloud Dashboard which is used to upload file and folder)
  2. We can upload files,folders  and share photos and view in bigger size with preceding or succeeding images with the left and right arrows.
  3. It has inbuild plugins by which we can view videos.
  4. We can search any file or folder with search button very quickly.
  5. We can provide password for every link we share.
  6. We can also set an expiration date, after which the shared document will automatically become private again. All these features make the sharing experience very secure and ideal for confidential files.
  7. We don’t need to save file after working on it or  editing  it is automatically saved.
  8. We can manage contacts and calanders with owncloud.
  9. Owncloud has great syncing capabilities with all types of Desktop clients like windows, linux,Mac,Android , iphone and provides two-way syncing which means that changes done anywhere will propagate across all the devices associated with a particular account.
  10. It allows encryption of data encryption of data.
  11. We allows ldap encryption and define quota per user.
  12. Store your files where you want

       External storage allows you to hook your existing data storage into ownCloud, letting you to access files stored on FTP, WebDAV, Amazon S3, and even Dropbox and Google Drive through one interface.



User manual can be found inside the user we login.