Check this Out!Visit our social network pages for recent updates!

Lesson 58: Installing OwnCloud on Ubuntu 16.10

This brief tutorial shows students and new users steps to install and configure OwnCloud on Ubuntu 16.04 / 16.10.

If you don’t already know, OwnCloud is an open source software that enables private cloud services on users’ own servers. Like DropBox and other cloud services, OwnCloud does similar things, and it’s free to download and install on your own servers without paying service providers.

In order to get OwnCloud installed, one must have the LAMP or LEMP stack enabled on his/her servers. We’ve written many good tutorials here on installing the LAMP stack. To learn how to install¬†OwnCloud on your servers, follow the steps below:

Step 1: Install LAMP Stack

To install and use OwnCloud, you must setup LAMP on your systems. This post assumes you already have the Ubuntu system installed and functioning and that you have root access to it. The post below shows you how to install LAMP.

Students Tutorial – Setup Ubuntu Linux with Apache2, MariaDB and PHP (LAMP)

Step 2: Add OwnCloud’s Repository and Install on Ubuntu

There are many ways to install OwnCloud.. however, the easiest of all is to install it directly from its repository. Run the commands below to add OwnCloud repository to Ubuntu
sudo sh -c "echo 'deb http://download.owncloud.org/download/repositories/stable/Ubuntu_16.10/ /' > /etc/apt/sources.list.d/owncloud.list"

Next, run the commands below to install the repository key

sudo curl https://download.owncloud.org/download/repositories/stable/Ubuntu_16.10/Release.key | sudo apt-key add -

After that, run the commands below to update and install OwnCloud

sudo apt-get update
sudo apt-get install owncloud owncloud-files

 Step 3: Configuring OwnCloud Database

After installing OwnCloud package, go and create a database for it. To do that, run the commands below to sign onto the database server as root

mysql -u root -p

Then run the commands below to create a new database called owncloud

CREATE DATABASE owncloud;

Next, run the commands below to create a database user for owncloud called ownclouduser

CREATE USER ownclouduser;

Next, grant all privileges to the database user by running the commands below

GRANT ALL ON owncloud.* TO 'ownclouduser'@'localhost' IDENTIFIED BY 'new_password_here';

Finally save your changes and exit

FLUSH PRIVILEGES;
exit

After that, change directory permissions for OwnCloud as shown below

sudo chown -R www-data:www-data /var/www/owncloud
sudo chmod -R 755 /var/www/owncloud

Restart Apache2

sudo systemctl restart apache2

Step 4: Connecting to OwnCloud

After you’ve created the database and user, open your browser and browse to the server hostname or IP address followed by owncloud. An example is shown below:

http://localhost/owncloud

You should then see OwnCloud setup page.. Connect to the database using the information you created and continue. Select the database server installed on your systems by clicking it as shown in the image below

owncloud_ubuntu

Click Finish setup and you’re done.

Enjoy!

owncloud ubuntu