If anyone of you don’t know that what is OwnCloud, then here it is. OwnCloud is a very great and exciting application for creating your own private and personal cloud storage. OwnCloud is a Dropbox-like application. OwnCloud is an open-source and free software. OwnCloud allows you to create your cloud storage to backup and syncing your data on many devices like laptop, desktop pc, iOS and android, and it also allows you to create a private file hosting cloud.

In this tutorial, I am going to show you step-by-step guide for installing OwnCloud on Ubuntu 15.04. It is basically quite easy to install OwnCloud on your VPS or even on the Shared hosting. Follow the guide below for installing the OwnCloud on your system step-by-step.

Requirements

Following stuff will be required for installation:

  • Firstly you’ll need a VPS running on Ubuntu 15.04. I will be using a droplet from DigitalOcean (DO) in this article, with 512 MB of RAM and 20 GB storage. I prefer using DO because of its great service and cool features.
  • You’ll need some proper knowledge for using SSH, Putty and common UNIX command.
  • And lastly you need some spare time to follow this guide for installation.

Procedure

Step 1 – Firstly you must have a fresh Ubuntu 15.04 server. Now you have to login to your server as root. I am using a droplet from DO, so if you are also using a droplet from DO, then you will be prompted to change the default root password.

a1

 

Step 2 – Now you have to make sure that that all the packages are updated. You can do so by using the following command:

1

2

apt-get update -y

apt-get upgrade –y

 

Now you’ll see the following screens:

14 15

 

Step 3 – As we know that OwnCloud is a web-based application that requires web server to run, so now we have to install Apache. We can install Apache using the following command:

apt-get install apache2  –y

Now you’ll see the following screen:

1

Step 4 – Now after installing Apache, we have to install PHP5. We can install it by using the following command:

apt-get install php5 php5-mysql  –y

2

Step 5 – Now in order forOwnCloud to run, we have to install the required PHP5 modules. And we can install those modules using this command:

apt-get install php5-gd php5-json php5-curl php5-intl php5-mcrypt php5-imagick –y

After running this command, you’ll see the following screen:

3

Step 6 – For processing all of its data, OwnCloud needs a database server. Currently, OwnCloud supports only MariaDB and MySQL. Now use the following command to install MariaDB on the VPS:

apt-get install mariadb-server –y

 

Now you should have the following screen:

4

Now to setup MariaDB for the first time, you have to enter the following command:

/usr/bin/mysql_secure_installation

Now press Enter if you are asked with current password and then answer the coming questions so. Now don’t forget to create new password, and you have to remember it (it will be your database password for the user root) you should have the following screens:

5 6

Step 7 – Now you have to login to MariaDB as root. And then you have to create a new user and a new database. To do these tasks, enter the following lines of command:

mysql -u root –p

Now you should have the following screen:

7

After this, now you’ll have to enter the following lines of command:

 

CREATE USER ‘newdbuser’@’localhost’ IDENTIFIED BY ‘newpassword’;

CREATE DATABASE ownclouddb;

GRANT ALL ON ownclouddb.* TO ‘newdbuser’@’localhost’;

FLUSH PRIVILEGES;

Exit

You can replace newdbuser with your own database username. In place of newpassword, you should put a different password of your own (and there should not be any spaces between the password that you enter). You can also replace ownclouddb with a new database name. This is what I had done after replacing these things:

8

Step 8 – So now, we have installed Apache and MariaDB. Now it is time to install OwnCloud on your system. To download OwnCloud, go to the following link, https://owncloud.org/install/ , and then click on the download button there.

oc1

Now what you have to do is that you have to copy its download link (right-click on the link and then select copy).

li

Now you have to get back to Terminal ( or Putty ) and then you have to download it by using the wget command. You can use the following command:

wget https://download.owncloud.org/community/owncloud-8.0.3.tar.bz2

you must change the download link. You should not forget that.

9

Now, you have to extract that package to Apache’s default web folder. You can do this operation by using the following command:

tar -xvf owncloud-8.0.3.tar.bz2 -C /var/www/html/

Now again, you should not forget to change the real package of the ownCloud according to the version that you have downloaded. You should NOT FORGET these things as they are essential. Now after this, you should have the following screen in front of you:

10

Step 9 – Now in this step, we have to set the directory permission. We can do so by using this command:

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

You should now see the following screen in front of you:

 11

Step 10 – Now we have to create a new virtual hosts file or a new Apache configuration, so that Apache can serve ownCloud. To do this, first you must create a new configuration file for the website that you own. For this tutorial, I am using abc.com (I will be using this domain for this tutorial’s sake, but it does not exists).

nano /etc/apache2/sites-available/abc.com.conf

you can now place your own domain name in place of abc.com and then press Enter on the keyboard.

 

<VirtualHost *:80>

     ServerAdmin webmaster@abc.com

     ServerName abc.com

     ServerAlias www.abc.com

     DocumentRoot /var/www/html/owncloud

     ErrorLog /var/www/abc.com/logs/error.log

     CustomLog /var/www/abc.com/logs/access.log combined

     <Directory “/var/www/html/owncloud”>

        Options Indexes FollowSymLinks

        AllowOverride All

        Order allow,deny

        allow from all

     </Directory>

</VirtualHost>

 

Now your screen should look something like this:

12

Now you have to save all the changes and then exit.

Now to store all the log files, you must create a new directory. You can do so by entering the following command:

mkdir -p /var/www/abc.com/logs

Step 11 – Now first you have to reload or restart the Apache and then you have to enable the newly created virtual host file by using the following command:

service apache2 reload

a2ensite abc.com.conf

now you should see something like this on your screen:

13

Setting up ownCloud

Step 12 – Now you can launch any browser you want and then access you brand new ownCloud website.

When you open the web browser, you will see the setup page of ownCloud, there you have to give a few things and then you can finish the setup process.

Create an admin account:

After that, you’ll be asked to create an admin account. In that page, you can just simply leave the data folder, and then type the MariaDB details that you had created before.

Configure the Database:

now the last step is that you have to configure the database and then click the finish setup button.

config-owncloud-database

Now ownCloud has been installed on your system and now you can start to sync files and folders from your various devices using the ownCloud client application. And now you can also create new users for your family, friends, and you now can even sale your newly built cloud storage service.

24 Shares
+1
Tweet
Share7
Share
Pin17
Stumble