How to install owncloud in Debian Wheezy 7

Installing owncloud in Debian is easy stuff. And hardly take a few minutes to install.I have posted some how to on installing owncloud in CentOS and Ubuntu as well.

The details of Debian server

IP Address: 10.0.0.24
OS info: Debian GNU/Linux 7 n l
arch: x86_64

To install owncloud in Debian Wheezy 7, follow the given below steps

Step 1 : Login into server and become super user (root)

sudo su -

OR

su -

Step 2: Run the below given command to add repo of owncloud and its repo key.

echo 'deb http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_7.0/ /' >> /etc/apt/sources.list.d/owncloud.list 

wget http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_7.0/Release.key
apt-key add - < Release.key  
apt-get update

Step 3: Install owncloud,mysql-server,apache2 and php5

apt-get install owncloud mysql-server apache2 php5

Note: while installation you will get screen of setting mysql root password. Hence set the mysql root password

Step 4: Now enable apache rewrite module.

a2enmod rewrite

Step 5: Login into mysql with user root and create database for owncloud. Here we are also creating owncloud user in mysql and only giving privileges to owncloud database.

Database Name: owncloud
MySQL User name: ownclouduser
Password of MySQL user(ownclouduser): GivePassword


# mysql -u root -p
(give mysql root password)

mysql> create database owncloud;

mysql> create user 'ownclouduser'@'localhost' IDENTIFIED BY 'GivePassword';

mysql> GRANT ALL ON owncloud.* TO 'ownclouduser'@'localhost';

mysql> flush privileges;

mysql> exit;

Step 6: Now open the webbrowser and type http://localhost/owncloud OR if you have installed in remote server then http://ip-address/owncloud.
Here I have installed the owncloud in remote server hence I am using debian server ip address 10.0.0.24.
Find the ip address of your server by using ifconfig command.

Set owncloud admin username and password. Here I am using username as admin,you can also use any other name and that username will be admin of owncloud web console.
After setting admin username and password, click on Advanced button and select MySQL

shot0002

Step 8: Now give all information of mysql database which you have set. And then click on "Finish Setup"

shot0005


After clicking Finish Setup,you will be redirected to Admin panel of owncloud. This is last step of owncloud server.
Enjoy uploading,downloading and sharing your stuffs.

shot0006


Posted

in

,

by

Tags:

Comments

11 responses to “How to install owncloud in Debian Wheezy 7”

  1. E Avatar
    E

    Thank you Sharad for the insights. I have tried a few ways of installing ownCloud and still receive the same message:
    After “reading state information” i receive “E: unable to locate package owncloud”. Do you know where this error stems from?

    1. sharadchhetri Avatar
      sharadchhetri

      Thankyou Eric,

      Definitely we will solve this issue. I need some information from your side –
      1. What is the Debian system (Run the 2 command
      a. cat /etc/issue
      b. arch
      )
      2. I would like to know how many ways have you attempt to install owncloud .

      I believe the problem is related to owncloud-client.

      Meanwhile kindly read this post from owncloud forum http://forum.owncloud.org/viewtopic.php?f=14&t=15675

  2. akhfa Avatar
    akhfa

    Very useful. But first time I saw php script as plain text when I access http://my.ip/owncloud. You can fix it by installing libapache2-mod-php5

    apt-get install libapache2-mod-php5
    or
    aptitude install libapache2-mod-php5

    I think you should add it 😀

  3. zitom Avatar
    zitom

    Thank you Sharad. Very useful and well done.
    All the best,
    zitom

    1. sharad chhetri Avatar

      Thankyou Zitom

  4. Roel Avatar
    Roel

    Hey,

    Thank you for this great user friendly tutorial.
    everything working within a few minutes.

    could you make a similair one regarding making owncloud accessible from outside ones home network and maybe include how to set up selfsigned ssl connection.

    Thanks

    1. sharad chhetri Avatar

      Thanks Roel, for setting self signed ssl connection you can follow this tutorial https://sharadchhetri.com/2013/05/24/how-to-configure-self-signed-ssl-certificate-in-owncloud-ubuntu/ . The tutorial was written on Ubuntu but it is also applicable to Debian. Let me know if you face any issue

  5. Robert Avatar
    Robert

    Vielen Dank für diese Anleitung für ownCloud.
    Ein super AddOn für meinen Schulserver.

    1. sharad chhetri Avatar

      Danke Robert, übersetzte ich Ihren Kommentar und froh zu wissen, dass Sie es verwenden in Ihrer Schule.

      Thankyou Robert, I translated your comment and glad to know you are using it in your school.

  6. Alan Feather Avatar
    Alan Feather

    Thank you for posting this easy to follow guide to installing ownCloud.

    I had mine working in 20 minutes.

    1. sharad chhetri Avatar

      Thanks Alan

Leave a 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.