Table of contents:

Create your own cloud: OwnCloud + DigitalOcean
Create your own cloud: OwnCloud + DigitalOcean
Anonim

Worried about the safety of your files and don't want to be read by strangers? Does cloud technology still beckon? Build your cloud!

Create your own cloud: OwnCloud + DigitalOcean
Create your own cloud: OwnCloud + DigitalOcean

Many readers of our site have said that they do not want to store their files and data in cloud services. Of course, this whole story with the US NSA undermined the credibility of Dropbox, Google Drive and other cloud services. And many thought about the security of their data. The solution to this problem can be the creation of your own cloud. Yes exactly! You can create your own cloud service. And all this will take you a maximum of 30 minutes. We have prepared detailed instructions for you.

So, to create our cloud, we will use DigitalOcean, where we will create our own virtual server (VPS), as well as OwnCloud, an application for creating a cloud server. Plus a domain. You can purchase a domain, for example, on Whois.com. It will cost you approximately $ 10 / year. The cheapest VPS on DigitalOcean is $ 5 / mo. For this amount, you will receive 20 GB of space. And it will be quite enough for the needs of an ordinary user. Let's get started.

We create a VPS

Screenshot from 2014-05-09 13:34:46
Screenshot from 2014-05-09 13:34:46

Go to the DigitalOcean website and register there. After creating an account, you need to create a droplet. This is what DigitalOcean calls VPS. The first step is to enter the name of our server. To create your own cloud, the cheapest option is enough for you - for $ 5 a month. The location of the server plays a big role - it directly affects the speed of access to your files. Therefore, choose the city closest to you. The system should be chosen Ubuntu 12.04. This is a version with long-term support (until 2017), and the fresh 14.04 is still too fresh:)

Connect to VPS

After creating a droplet, you will receive an email with the IP address of your server and a password to access it. To connect to the server, you need an SSH tool. On Linux and Mac, this is the Terminal already installed. But for Windows users, I advise you to download Putty. The program is absolutely free.

In the terminal, enter the following command to connect to the server (instead of units, enter the IP address of your server):

Congratulations. You are connected to your server! Now you need to install apache, mysql, php5 (LAMP) and, in fact, OwnCloud itself. To do this, we simply execute the code line by line. Without lines with comments (at the beginning there is a pound) - these are explanations for you.

sudo apt-get update

# Get all updates for the server

sudo apt-get upgrade

# Install these same updates

sudo apt-get install lamp-server ^

# Installing LAMP. You will need to set the MySQL root password.

sudo mysql_secure_installation

# At this stage, you will be asked "yes / no" several times for different questions. You can safely answer "No" to the first and "Yes" to all the others.

sudo apt-get install php5-gd php-xml-parser php5-intl smbclient curl libcurl3 php5-curl

# Install the necessary plugins for OwnCloud

sudo a2enmod rewrite

sudo a2enmod headers

sudo nano / etc / apache2 / sites-available / default

A text document will open. In it, you need to find the following lines and fix AllowOverride None to AllowOverride All. Then "Ctrl + X", then "Y" and Enter.

Scr1
Scr1

Congratulations, you have all the software you need to keep your server running smoothly. Now you need to install OwnCloud. Only 7 teams, don't worry:)

tar -xjf owncloud-latest.tar.bz2

mv owncloud / var / www

# Download the latest version of OwnCloud to your server, unzip it and move it to the folder you need to access via the web.

cd / var / www

sudo chown -R www-data: www-data owncloud

# For the normal functioning of OwnCloud, you need to give him access rights to the main web folder of our server.

mysql -u root -p

CREATE DATABASE owncloud;

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

exit;

# Create a database for OwnCloud. You can change the words owncloud and password.

sudo service apache2 restart

# Restart our server

Go to the address (instead of units - your server address):

111.111.111.111/owncloud

And we complete the installation of OwnCloud.

Domain connection

Screenshot from 2014-05-11 22:30:45
Screenshot from 2014-05-11 22:30:45

You can get by with just an IP address, but this is impractical and ugly. Therefore, it is worth connecting a domain. To do this, go to the DigitalOcean → DNS panel and click the Add Domain button there. Enter the domain address and select the desired one from the list of droplets. That's it, in a couple of hours, maximum a day, you will have access to your cloud at domain.com/owncloud.

Enjoy it!