• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

How to install Owncloud 6 on Ubuntu 14.04 LTS Server

May 22, 2014 by Sharad Chhetri 39 Comments

In this tutorial we will learn about, how to install Owncloud 6 on Ubuntu 14.04 LTS Server. Owncloud now a days very popular in Internet World. It is one the awesome alternate for Drop Box. Moreover it is free and Open Source software, primarily using for ‘file hosting’.

In case you are looking for creating your Own file hosting Server, Owncloud is more suitable for you. It is free and Open source, has many great features.

You can find many apps developed by Owncloud team and many volunteers in owncloud apps repository. You can also write the apps for Owncloud and submit in the repository . It will be great help to Owncloud community.

Currently, Owncloud has released version 6 series. You can read about the new features of Owncloud 6 from this link.

Installing Owncloud 6 on Ubuntu 14.04 LTS Server (Trusty Tahr)

In this practical, the installation has been done on Single Server, where Owncloud, Apache and MySQL are installed.

Requirements :
(1) Database Server : MySQL (version 5.6)
(2) Web Server : Apache (version 2.4)
(3) Operating System : Ubuntu 14.04 LTS Server Edition
(4) Web Application : Owncloud version 6.x
(5) Knowledge of IP based and Name based Virtual Hosting in Apache

Follow the given below steps to install Owncloud 6 on Ubuntu 14.04 LTS (Trusty Tahr)

(Step 1): Install MySQL Server

You can install MySQL 5.6 on Ubuntu 14.04 LTS . At the time of writing this post, it is the latest and stable release. The latest MySQL 5.6 version is available in Ubuntu repository, hence it can be installed via using apt-get command .

sudo apt-get update
sudo apt-get install mysql-server-5.6

(Step 2) : Create MySQL user for Owncloud server

Now create mysql user for Owncloud server. The MySQL user will help the Owncloud Server to connect with Database. We also give full privilege to this MySQL user on Owncloud’s database.

The given below are the details which will create in MySQL Server.

Database Name : owncloud
MySQL User Name : ownclouduser
MySQL User’s Password : Password

Login into MySQL Server with root user (Use MySQL root password here).

mysql -u root -p
After login you will get the mysql prompt like this
mysql >
Now create a user and set the password. Use strong password
mysql> CREATE USER 'ownclouduser'@'localhost' IDENTIFIED BY 'Password';
create database called owncloud
mysql> create database owncloud;
Grant privileges to owncloud user in owncloud database
mysql> GRANT ALL ON owncloud.* TO 'ownclouduser'@'localhost';
mysql> flush privileges;
mysql> exit

( Step 3 ): Install Apache and PHP

For web server requirement, we are installing Apache . The Owncloud is PHP based application, hence we will install PHP version 5 . To connect PHP code with MySQL database, we will install the module named as php5-mysql.

sudo apt-get install apache2 php5 php5-mysql

(Step 4 ) : Enable rewrite module

The Owncloud application has .htaccess file which has some rewrite rules. Use below given command to enable rewrite module

sudo a2enmod rewrite

sudo service apache2 restart

(Step 5 ): Install Owncloud Server

Now in this step we will install owncloud package on Ubuntu 14.04 LTS

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

wget http://download.opensuse.org/repositories/isv:ownCloud:community/xUbuntu_14.04/Release.key
sudo apt-key add - < Release.key  

sudo apt-get update
 	
sudo apt-get install owncloud

( Step 6 ): Move Owncloud data directory

By default, after installation of Owncloud its data directory is saved in /var/www .

In Ubuntu 14.04, default Apache 2.4 is shipped. You can see defualt DocumentRoot as /var/www/html in Apache 2.4 (Ubuntu 14.04 LTS) , which is different than previous Ubuntu version (Earlier it was only /var/www)

Move the Owncloud data directory to /var/www/html

sudo mv /var/www/owncloud /var/www/html

(Step 7 ) : Configuring owncloud.conf file

By default, you will get owncloud.conf file in /etc/apache2/conf.d after owncloud installation.

Here we will do some changes, so that it should work with Apache 2.4 version

Take backup of original owncloud.conf file.

sudo cp -p /etc/apache2/conf.d/owncloud.conf /etc/apache2/conf.d/owncloud.conf.orig.`date +%F`

Move owncloud.conf file to /etc/apache2/sites-enabled

mv /etc/apache2/conf.d/owncloud.conf /etc/apache2/sites-enabled

Unlink the default Apache Configuration file, known as 000-default.conf
Note: 000-default.conf is softlink

sudo unlink /etc/apache2/sites-enabled/000-default.conf

Edit the owncloud.conf file as given below .

YOU HAVE TWO OPTIONS EITHER CONFIGURE WITH IP BASED VIRTUAL HOST or NAME BASED VIRTUAL HOST.
I AM WRITING BOTH METHOD. YOU HAVE TO SELECT ONLY ONE METHOD TO EDIT owncloud.conf FILE

IP based Virtual Host

For configuring Apache we use IP Address of Server here. Which you can obtain by using ifconfig command

sudo vi /etc/apache2/sites-enabled/owncloud.conf

Paste given below contents in owncloud.conf file. NOTE: Replace 192.168.56.101 with your Server IP Address



	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/html/owncloud

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined


  AllowOverride All
  Require all granted



OR

Name based Virtual Hosting

In case you have Domain name, you can use Name based Virtual Hosting .

sudo vi /etc/apache2/sites-enabled/owncloud.conf

Paste given below contents in owncloud.conf file. NOTE: Replace owncloud.example.com with your domain name.



	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/html/owncloud

        ServerName owncloud.example.com

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined


  AllowOverride All
  Require all granted


(Step 8): Restart apache service

After doing configuration, restart apache service.

sudo service apache2 restart

( Step 8 ): Installing Owncloud through Web Interface

* Open the Owncloud URL in Web Browser .

* Give Owncloud Dashboard administrator user name. We have given the name as "admin"

* Click on Advanced tab , it will open the Database option. Click on MySQL tab. And give the MySQL credentials, which we have already set up in Step 2
Then, finally click on Finish setup button. And that is it, you are into Owncloud Admin dashboard.

Owncloud 6 , Ubuntu 14.04 LTS

We would like you to explore awesome features of Owncloud. You can give your contribution to Owncloud project, it will be wonderful gift to others.

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. Setup self signed ssl certificate on Owncloud 6 in Ubuntu 14.04 LTS Server
  2. Install Owncloud 7 on Ubuntu 14.04 LTS Server
  3. htaccess file does not work : Owncloud 6 in Ubuntu 13.10 Server
  4. How to install Owncloud 6 in Ubuntu 13.10 Server
  5. Install owncloud 8 on ubuntu server 14.04
  6. Setup Owncloud 6 with self signed SSL certificate on Ubuntu 13.10
  7. owncloud error : You are accessing the server from an untrusted domain
  8. How to install owncloud in Ubuntu 12.10
  9. How to install Apache Web Server on Ubuntu 14.04 LTS (Trusty Tahr)
  10. How to configure self signed SSL certificate in owncloud Ubuntu

Filed Under: Linux, owncloud Tagged With: Owncloud 6, ubuntu

Reader Interactions

Comments

  1. BeSwed says

    March 20, 2015 at 2:27 pm

    Hello sir,

    Greetings Of the Day!!

    I have not installed this owncloud…Before that I want to know whether it can be linked with php virtualbox.If yes, can you tell me how to link them?.
    Also, I want to know whether this ownCloud only provides storage. Whether it provides any computation can be done using this ownCloud…..Waiting for valuable reply..

    Thanks & Regards,
    BeSwed

    Reply
    • sharad chhetri says

      March 21, 2015 at 2:58 am

      Hello BeSwed,

      You can consider Owncloud as alternate of Dropbox .
      I did not get with your question on php virtualbox because php virtualbox is a web interface management for ‘Virtual Box’.
      Try installing Owncloud on virtualbox and let us know your feedback.

      Regards
      Sharad

      Reply
  2. Kantu says

    October 26, 2014 at 6:03 am

    i followed all the steps and i was able to acess to owncloud but how to acess from example.com/ownclound instead of example.com, i have no much experience on this, thank you

    Reply
    • sharadchhetri says

      October 27, 2014 at 4:54 am

      Hello Kantu,

      Follow the steps for “Name based Virtual Hosting”,it is written in tutorial.
      example.com we have taken as an example only. You must have your own registered domain. just like sharadchhetri.com.

      Thanks and Regards
      Sharad

      Reply
  3. Max says

    October 1, 2014 at 5:10 pm

    hi there i followed your instructions, worked well, tnx!
    but today i wanted to upgrade my installation to the latest version using the owncloud update-center, but i get an error which means that there are rights missing to write the files,..

    did anyone else find this problem?

    Reply
    • sharadchhetri says

      October 2, 2014 at 2:19 am

      Hello Max,

      Thanks for reporting this issue.
      I will reproduce the problem in my testing machine will work on it.
      Seems may be while updating it is looking for /var/www/html location .

      Regards
      Sharad

      Reply
      • Max says

        October 4, 2014 at 3:34 pm

        seems that privileges for the owncloud directory are missing: sudo chown www-data:www-data -R /var/www/html/owncloud
        then it works

        Reply
        • sharadchhetri says

          October 5, 2014 at 2:34 am

          Welcome Max.

          Reply
  4. David Francis says

    August 27, 2014 at 3:18 pm

    Thanks for the tutorial, at least I’ve got OC working after a fashion.
    There is a typo in the ‘wget’ call in Step 5; there should be a ‘/’ (slash) between ‘isv:’ and ‘owncloud’, it should read. ‘…..isv:/owncloud….’.
    Advice to anyone intending to install OC on a fresh Ubuntu 14.04 install is to include the ‘LAMP’ server from the list of available options during o.s. installation. It avoids the dependency problems associated with installing individual packages (apache2, php, etc.) later.

    My own problem is that installing OC in the way recommended in this tutorial does away with the default apache index page. Earlier versions were called by ‘http://192.168.x.x/owncloud’ but installing this way requires ‘http://192.168.x.x’, doing away with the apache index page.

    Reply
    • sharadchhetri says

      August 27, 2014 at 3:24 pm

      ThankYou David.
      And also thanks for suggestion

      Regards
      Sharad

      Reply
  5. Jesse Millwood says

    August 19, 2014 at 6:36 pm

    I am new to this and trying to set up owncloud on my Ubuntu 14.04 server. I have followed your directions up to the point where you are supposed to install owncloud via apt-get. I keep getting the error:

    The following packages have unmet dependencies:

    owncloud : Depends: php (>= 5.3.3) but it is not installable

    Recommends: php5-apc but it is not installable

    E: Unable to correct problems, you have held broken packages.

    Any advice is welcome, I have tried to install php5-apcu and php5-apc via apt-get and it still will not install own cloud

    I have also checked the version of php5 by php5 –version and it showed that I have 5.5.9

    Reply
    • sharadchhetri says

      August 20, 2014 at 3:15 am

      Hello Jesse,

      Welcome in my blog.
      Run the command
      cat /etc/issue

      I suspect you are using Ubuntu 14.04 Desktop Edition. Actually the post is written for Server Edition.
      Kindly let me know the details, we will surely overcome from this issue

      Regards
      Sharad

      Reply
      • Jesse Millwood says

        August 20, 2014 at 1:26 pm

        Sharad,
        Thank you for your quick response. I am positive that I have installed the Ubuntu Server edition on the machine I am working on. But I seemed to have resolved my issue. I started trying to follow another tutorial (https://www.youtube.com/) and there was a few packages that were recommended and after installing those I was able to install owncloud via apt-get. The packages were:

        sudo apt-get install php5-gd php-xml-parser php5-intl smbclient curl libcurl3 php5-curl php5-ldap

        Thanks again and great blog!

        Reply
        • sharadchhetri says

          August 21, 2014 at 6:38 pm

          Thankyou Jesse,

          Your comment will help other readers if face similar issue like yours.

          Appreciate for sharing the command.

          Thanks and Regards
          Sharad

          Reply
« Older Comments

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Linux Command

What is Linux Internal And External Command

Linux Basic Commands With Examples For Every Beginner

tr command to convert lines to space , tab and vertical tab

smbpasswd command not found on CentOS 7 and RHEL 7

Solution : semanage command not found

Unix / Linux : How to print duplicate lines from file

More Posts from this Category

You Might Like These Articles!

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

libfuse

dlopen(): error loading libfuse.so.2 – Got Error On Ubuntu

Failed to open/create the internal network

VirtualBox Error: Failed to open/create the internal network

Always Useful Tips And Tricks

How to put slider shortcode only in home page in WordPress

How to see line numbers in file through cat command

How to create a file with cat command

30 useful Linux terminal keyboard shortcuts

curl command to check the http status

How to reset forgot root password in CentOS 6.x and Redhat 6.x

Could not find make anywhere!!! Please edit the config section to include the path to make. at ./install.pl line 2101

Explore 90+ Article On "Linux Tips And Tricks"

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission.
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy