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.
Following stuff will be required for installation:
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.
Step 2 – Now you have to make sure that that all the packages are updated. You can do so by using the following command:
|apt-get update -y|
apt-get upgrade –y
Now you’ll see the following screens:
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:
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
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:
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:
Now to setup MariaDB for the first time, you have to enter the following command:
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:
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:
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’;
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:
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.
Now what you have to do is that you have to copy its download link (right-click on the link and then select copy).
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:
you must change the download link. You should not forget that.
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:
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:
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).
you can now place your own domain name in place of abc.com and then press Enter on the keyboard.
CustomLog /var/www/abc.com/logs/access.log combined
Options Indexes FollowSymLinks
allow from all
Now your screen should look something like this:
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
now you should see something like this on your screen:
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.
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.
now the last step is that you have to configure the database and then click the finish setup button.
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.