The All-In-One-Guide
for installing Owncloud on a vServer or Root Server running Ubuntu >12.04.
# Install Owncloud using openSUSE Build Service
wget http://download.opensuse.org/repositories/isv:ownCloud:community/xUbuntu_14.04/Release.key
sudo apt-key add – < Release.key
# Add the the repository to apt
sudo sh -c „echo ‚deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/xUbuntu_14.04/ /‘ >> /etc/apt/sources.list.d/owncloud.list“
sudo apt-get update
sudo apt-get install owncloud
# Creating MySQL database for owncloud
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
# Create a database for owncloud
mysql -u root -p
CREATE DATABASE owncloud1;
# add an user for the ‚owncloud‘ database
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON owncloud.* TO ‚owncloud‚@’localhost‘ IDENTIFIED BY ‚password‚;
# Self Signed SSL for transport encryption
sudo a2enmod ssl
sudo a2enmod rewrite
sudo service apache2 restart
# Create your own certificate
sudo mkdir -p /etc/apache2/ssl
# Make apache using ssl
# 1.
vi /etc/apache2/apache2.conf
### paste below given lines,at the end of file apache2.conf ###3
IncludeOptional conf.d/*.conf
# 2.
vi /etc/apache2/conf.d/owncloud.conf
# replace everything with the following
<VirtualHost 213.165.81.17:80>
DocumentRoot /var/www/owncloud/
<Directory /var/www/owncloud>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost 213.165.81.17:443>
####Configuration for SSL #####
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/owncloud.pem
SSLCertificateKeyFile /etc/apache2/ssl/owncloud.key
#### End of SSL Configuration ####
DocumentRoot /var/www/owncloud/
<Directory /var/www/owncloud>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
# Restart apache
/etc/init.d/apache2 restart
Done!