Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

This Guide will use a MySQL DB and presumes a "pristine" installation.

Pre-Req:

sudo apt-get install -y apache2 mysql-server libapache2-mod-php5 php5-gd php5-json php5-mysql php5-curl php5-intl php5-mcrypt php5-imagick && mysql_secure_installation

Create New MySqlDB

mysql -u root -p
CREATE USER 'ownclouduser'@'localhost' IDENTIFIED BY 'YOURPASSWORD';
CREATE DATABASE ownclouddb;
GRANT ALL ON ownclouddb.* TO 'ownclouduser'@'localhost';
FLUSH PRIVILEGES;
exit

 

Install: (note for Different Ubuntu Distros check NoobsLab for different PPA instructions)

sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/xUbuntu_15.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 -y owncloud openssl
sudo chown -R www-data:www-data /var/www/owncloud
sudo rm /var/www/html/index.html

 

Sign in now @ http://localhost/owncloud or privateip/owncloud

Fill in fields, I like to change default install path for files. Change from SQLite to MySQL with information created earlier. By signing in Owncloud creates its "config.php"

You may get errors about the directories permissions, this is owncloud doing its thing "protecting you", just follow any prompts.

Now edit "config.php"

 sudo nano /var/www/owncloud/config/config.php

 

Add trusted domain of Public IP -under config array

 1 => 'freesoftwareserver.com',

Final Steps:

 sudo a2ensite default-ssl && sudo a2enmod ssl && sudo a2enmod rewrite && sudo a2enmod headers && sudo service apache2 restart && sudo chown -R www-data:www-data /var/www/owncloud/

Again you may have to mess with permissions of the Data directory if you changed it. Apache will throw any errors it has at CLI and/or owncloud will @ sign in.

Bonus : Forward root of domain to /owncloud if desired

 sudo sh -c 'echo "RedirectMatch ^/$ /owncloud/" >> /etc/apache2/apache2.conf' && sudo service apache2 restart
  • No labels