In this tutorial we will install Owncloud in Ubuntu , which is a web application, like " Google Drive ", that will allow us to have our own private cloud and we will be able to store all the files in our pc.
Note: Currently there is an opensource version called NextCloud , since Owncloud has a business mode and another opensource mode.
We have several options for installation, if we use Linux , we can add the package repositories via apt and keep it updated in this way.
Another option would be to download the compressed file to unpack it in the Apache path where appropriate.
We even have a third option available, which is to download a virtual machine already mounted in VirtualBox , which is called a vm appliance and is ready to be configured and used.
In this tutorial we will continue with the manual option of unpacking in the Apache, remember that it is the option to download the file and copy it in the Apache.
It would be advisable to have it installed via the package manager apt to have it updated.
We started the tutorial.
We opened our Ubuntu virtual machine that we created in the tutorial how to install Ubuntu Linux in a VirtualBox virtual machine .
It will also be necessary to have the tutorial how to install Apache, MySQL and PHP in Ubuntu .
The options to install Owncloud that we discussed earlier would be the following:
1) Direct download:
we will leave it in our home .
will create a owncloud directory in our home.
Later we will copy that directory below html of our installation of Apache, in our example it will be in / var / www / html / owncloud and we will change the permissions of those files so that they are of the user www-data.
sudo cp -R $ HOME / owncloud / var / www / html
sudo chown -R www-data: www-data / var / www / html / owncloud
2) via apt manager
We can add the source repository for our virtual machine with Ubuntu 14.04:
wget -nv https://download.owncloud.org/download/repositories/stable/Ubuntu_14.04/Release.key -O Release.key
sudo apt-key add - <Release.key
sudo sh -c "echo 'deb http://download.owncloud.org/download/repositories/stable/Ubuntu_14.04/ /'>> /etc/apt/sources.list.d/owncloud.list"
Then we will update and install via apt :
sudo apt-get update
sudo apt-get install owncloud
The next thing will be to create the database for the application.
We will enter as administrator in the mysql client:
sudo mysql -u root -p
As we have said above we will opt for option 1, so then we will set out to configure the database and the user:
We will create the database " owncloud ":
CREATE DATABASE owncloud;
We will create the user:
create user clouduser @ localhost identified by 'clouduser1234';
We will assign the user's privileges:
GRANT ALL ON owncloud. * To 'clouduser' @ 'localhost' IDENTIFIED BY 'clouduser1234';
We will record the user's privileges with:
And we will go with:
We will install the module GD and cURL of Apache since they are necessary for this application. Then we will restart the Apache server.
sudo apt-get install php5-gd
sudo apt-get install php5-curl
sudo service apache2 restart
We will access the browser by putting http: // ourIP / owncloud or http: // localhost / owncloud
and we will see a screen like the following:
We will complete all the data: username and password for the administrator of the private cloud, the directory of the data (we will leave it the same by default), the user and the password of the database defined above ( clouduser , clouduser1234 ), the name of the database ( owncloud ) and destination " 127.0.0.1 " instead of localhost .
We have found some bug when specifying locahost , so we prefer to change it by IP.
Then we will click on "Complete the installation".
We will see a screen like this:
Once there we will be inside! We will see that it will give us the option to download the application for Android and iOS. It is a bad option if we are going to make use of the cloud from our smartphone or tablet.
At the configuration level we can create users, in the upper right menu under the name. This is interesting in order to have users who are not administrators and with a specified disk quota .
In the top left menu we can click on "Files" and navigate through the folder structure. For example, in the next screen we see the options that a file has: details, rename, download, delete.
We can also create a shared link of a file, protected with a password or with an expiration date.
To summarize, we have installed and configured owncloud in our Ubuntu virtual machine as a tutorial, but we could perform the same installation on a PC in our network permanently connected to the Internet.
In this way we will have our own private cloud on the Internet, with the advantage of having the files on our hard drive and not have it scattered on a Dropbox or Google server.
A more secure option would be to configure it in https mode with an SSL certificate, but that would require an economic expense for the purchase of an SSL certificate and a domain.