Menu

How to install OwnCloud in Ubuntu

3 years ago 0

In this tutorial, we will learn how to install OwnCloud 8 on Ubuntu 15.10. OwnCloud is an open-source alternative to DropBox. It has the same functionality as Dropbox, but unlike DropBox the data is hosted by you and you have total control over it.

Note

We will be installing OwnCloud, Apache, MariaDB, PHP, as well as some extra PHP modules required by OwnCloud.

Install

As always we need to update our packages list and upgrade any available package updates

sudo apt-get -y update && sudo apt-get -y upgrade

Now we install all of the dependencies required by OwnCloud

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

When installing the MariaDB server, you will be prompted to create a root password. Be sure to remember the password you enter here, you will need it during OwnCloud Installation.

Next we go Go to the OwnCloud Download Page and download the latest OwnCloud Server, in my case it was OwnCloud 8.2.2

Download to your server

wget https://download.owncloud.org/community/owncloud-8.2.2.zip

Now we can extract the file contents.

unzip owncloud-8.2.2.zip

Now we will copy the files to your web servers root folder.

sudo cp -r owncloud /var/www/html

We now give the Apache User ownership of the owncloud folder

sudo chown -R www-data:www-data /var/www/html/owncloud/

Next we will configure apache to host your OwnCloud.For this we will need to create the owncloud config.

sudo nano /etc/apache2/sites-available/owncloud.conf

Our configuration should look like this


  Options +FollowSymlinks
  AllowOverride All

 
  Dav off
 

 SetEnv HOME /var/www/html/owncloud
 SetEnv HTTP_HOME /var/www/html/owncloud


Restart Apache to apply the config file

sudo service apache2 restart

The last step to complete is to run the Installation Wizard.
Open your Web browser and go to the servers IP.

http://serverip/owncloud

Now we create the admin username and password and select the data folder where we want the files that OwnCloud will share.
We need to configure the database for the OwnCloud installation, we can choose the name that we want for the database, and we will be using the root user and password we created earlier.