uniq_

install owncloud on debian 7

Let's jump right into installing owncloud on a plain Debian System:

# add owncloud debian repo
echo 'deb http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_7.0/ /' >> /etc/apt/sources.list.d/owncloud.list
wget -qO- http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_7.0/Release.key | apt-key add -

# install the server software
apt-get install owncloud mysql-server

# now take a look at your generated mysql super-user credentials
cat /etc/mysql/debian.cnf

# use super-user to get a mysql shell
mysql -u debian-sys-maint -p

Create a MySQL user and database for owncloud. Just execute this in the sql shell:

create user 'owncloud'@'localhost' IDENTIFIED BY 'password';
create database owncloud;
grant all privileges on owncloud.* to 'owncloud'@'localhost';
flush privileges;

Great. Now configure /etc/apache2/sites-available/default:

  • Update all occurances of AllowOverride None to AllowOverride All. (to allow .htaccess files)
  • If you're running this behind a reverse proxy which terminates TLS: add SetEnv HTTPS on to vhost.
# add a html forward for directing users to owncloud
echo "<html><head><meta http-equiv="refresh" content="0; url=/owncloud/" /></head><body></body></html>" > /var/www/index.html

Almost done. Go to url of the fresh installed instance to complete ownclowd setup.


I also installed their linux client:

echo 'deb http://download.opensuse.org/repositories/isv:ownCloud:devel/Debian_7.0/ /' >> /etc/apt/sources.list.d/owncloud-client.list
wget -qO- http://download.opensuse.org/repositories/isv:ownCloud:devel/Debian_7.0/Release.key | apt-key add -
apt-get update
apt-get install owncloud-client

written by uniq on 2014-06-15