Tuesday, September 17, 2013

My Own Cloud, its Open Source !!!

Your Cloud, Your Data, Your Way !!!

“Cloud is everywhere !!!”. I am not talking about dark cloud or rainy cloud. I am talking about Cloud Technology. Now lets say I want my own cloud in my premises. Don’t worry now we have ownCloud.
“ownCloud is a free and open-source web application for data synchronization, file sharing, and cloud storage.” … Wikipedia.
One of my friend suggest me, that use of word "own cloud" is misnomer. Cloud stands for clustered storage and services that can be accessed together. Its not much of cloud if its on a single machine. My intention here to introduce you with Storage solution much like Dropbox. Where you can take backup of your files as well as you should able to retrieve files easily.
We are going to learn how to install ownCloud on your system as Cloud Server and how to install client tools to access files from this Cloud Server.

Installation of OwnCloud:

There are following ways to install OwnCloud :

Install ownCloud using the Web Installer
Install ownCloud using the Web Installer

1. Install ownCloud using the Web Installer:
Make sure that you have working *AMP stack. i.e. Apache, MySQL, PHP. I prefer XAMPP stack, which works flawlessly for me for more than 8 years. Now Xampp & BitNami are working together. The Web Installer is the easiest way for novice users to install ownCloud on their desktop or web hosting space. It checks the dependencies, download the newest ownCloud from the official server, unpacks it with the right permissions and the right user account. Finally, you will be redirected to the ownCloud installer.

1) Right-click here and save the file to your computer
2) Upload setup-owncloud.php to your web space
3) Point your web browser to setup-owncloud.php on your webspace
4) Follow the instructions and configure ownCloud
5) Login to your newly created ownCloud instance!

2. Tar or Zip file
The .tar archive is the classic way of installing ownCloud server. It provides the server and all immediate 3rd party PHP libraries.

1)  Download Unix (.tar.bz2) or Windows (.zip) archive

2)  Check package integrity using the MD5 sum: Unix / Windows
3)  Follow the ownCloud Admin Manuals installation chapter
Install XAMPP stack on your Operating System.
Execute following command in terminal if you are using Ubuntu/Debian Linux.
$sudo apt-get install apache2 php5 php5-gd php-xml-parser php5-intl
$sudo apt-get install php5-sqlite php5-mysql smbclient curl libcurl3 php5-curl

4)  Extract and copy file into webserver root directory

$sudo tar -xjf path/to/downloaded/owncloud-x.x.x.tar.bz2
$sudo cp -r owncloud /path/to/your/webserver

5)  Set appropriate permission for “data” direcotry
$sudo chown -R www-data:www-data /path/to/your/owncloud/install/data

6)  Enable .htaccess and mod_rewrite if Running Apache
To enable .htaccess files you need to ensure that AllowOverride is set to All in the Directory /var/www/ section of your virtual host file. This is usually in /etc/apache2/sites-enabled/000-default. You should also run a2enmod rewrite and a2enmod headers. Then restart apache: service apache2 restart (for Ubuntu systems). In order for the maximum upload size to be configurable, the .htaccess file in the ownCloud folder needs to be made writable by the server.

7)  Follow the Install Wizard
Open your web browser and navigate to your ownCloud instance. If you are installing ownCloud on the same machine as you will access the install wizard from, the url will be: http://localhost/ (or http://localhost/owncloud). For basic installs we recommend SQLite as it is easy to setup (ownCloud will do it for you). For larger installs you should use MySQL or PostgreSQL. Click on the Advanced options to show the configuration options. You may enter admin credentials and let ownCloud create its own database user, or enter a preconfigured user. If you are not using apache as the webserver, please set the data directory to a location outside of the document root. See the advanced install settings.

Using Client interface for Own Cloud:

Once you have OwnCloud server running on Cubie Board, you can use following client interface to do all operations:
1. Web Browser
2. Desktop Client
3.  Mobile Client

ownCloud Server Login Screen
ownCloud Server Login Screen

1. Web Browser:
Using any html 5 supported browser can access server, serve the purpose.

2. Desktop Client:
Using Desktop Sync Clients user can install client tool, which are available for Windows, Mac OS X and a wide range of Linux distributions. This will help user to Sync your local files with your ownCloud.

ownCloud Client
ownCloud client for Mac
(Mac OS X 10.6 or better, Intel 64 bit)

3. Mobile Client:
Access you ownCloud anytime, anywhere using your portable devices. Official apps are available on App Store for iPhone & iPad and Google Play for Android device. These apps are not free, but its worth, if you really worry about your data on Mobile.

ownCloud App
ownCloud App on Android

Now you can just drag & drop files on your cloud server for backup. Also you can select files or folders to automatic syncing. i.e. If you just add, remove, update any files, this will synchronize with your backup files, hosted on you cloud storage.  So I hope you will never loose your photos or you will never experience "Not Enough Memory" kind of error on Mobile, while taking snaps on outdoor trip :)  Keep playing around this Cloud, please do share me your experiences. And if you have any other application/ software similar to this, please share information about that. If you have any question please ask me, I would like to see adoption of more & more Open Source Cloud based application on Mobile as well as Desktop.