Jun 182012
 

A lot of people use cloud storage systems like Dropbox, Spideroak or Ubuntu One, these software allow you to store your files on a remote server (on the clouds) and be able to access them on all your devices: computers with Linux,mac or Windows and also from tablets and smarthphones.
But it wouldn’t better to manage yourself your own storage system ?

This could be really useful for small and large company to setup their own storage with their security policy and permission systems, or also for people that want to have the full control on their files.

So today we’ll take a look at owncloud, this is a software suite that provides a location-independent storage area for data (cloud storage). The project was launched in January 2010 from KDE developer Frank Karlitschek to create a free alternative to commercial cloud providers.

The project is based on PHP and a SQLite, MySQL or PostgreSQL database, so ownCloud can run on all platforms that meet these requirements.
The software is releasead with AGPLv3 license.


Installation

You can use the following sequence of commands in a terminal, as root, to install all the prerequisites, download the last version of owncloud and set it in the document root of apache.
These commands will works on Ubuntu and Debian.

cd
apt-get update && apt-get -y install apache2 php5 php-pear php-xml-parser php5-sqlite php5-json sqlite php5-mysql mp3info curl libcurl3 libcurl3-dev php5-curl zip php5-gd
wget http://download.owncloud.org/releases/owncloud-4.0.2.tar.bz2 && tar xjf owncloud-4.0.2.tar.bz2  &&  cp -r owncloud /var/www/  &&  chown -R www-data:www-data /var/www/owncloud 
/etc/init.d/apache2 restart

It is recommended that you enable .htaccess files as ownCloud uses them to enhance security and allows you to use webfinger. 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).

Configure the database

In this example we are installing sqlite as database, but if you’ve already a mysql up and running you can use it, you just need to create a new username and database, to do it connect on your server open a terminal and give the command mysql (you need to know your admin and password details) and once you are in the mysql prompt use the following commands:

$ mysql -u adminusername -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5340 to server version: 3.23.54
 
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
mysql>CREATE DATABASE owncloud;
Query OK, 1 row affected (0.00 sec)
 
mysql> GRANT ALL PRIVILEGES ON owncloud.* TO "mycloud"@"localhost"
-> IDENTIFIED BY "mypassword";
Query OK, 0 rows affected (0.00 sec)
 
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)
 
mysql> EXIT
Bye
$

This create a mysql database with name owncloud, that can be accessed with username=mycloud and password mypassword from localhost.

First setup

Now it’s time to do the first setup of owncloud, to do this open a browser and load the url: http://yourservername/owncloud, if you are installing this softare on the machine where you open the browser you can use http://localhost/owncloud, you’ll see a screen like this one:

owncloud

Owncloud Wizard

Choose an username as admin and a password, if you are using sqlite you’re done, otherwise just put the details of your Mysql server.
You’ll get the dashboard of the Admin user of owncloud, and from here you can start to work on this software:

owncloud2

I suggest to click the wheel in the lower left corner (settings) and from here on users, you’ll see the user management area, from here you can set a default quota for all users (none,1,5,50 GB or a number at your choice) and create a new user and/or groups.

Sync Clients

The ownCloud Sync Client is a desktop program running on your computer.One ore more specified directories on the local machine are going to be synced to your ownCloud. Files on your ownCloud are automatically the same as the ones on the local disk. If you change one here, its gets there and vice versa.The latest version of the client is version 1.0.2, released on may 18, 2012.

At the moment the client is available for mac,Windows and Linux; you can download it from the official site

Owncloud 4 features

These are some of the many Owncloud 4 features, consider that you have all the standard option that you are used in other software, like sharing data with other users or groups, access your data via browser and sync it with the sync client, these are some “extra” feature that i consider really brillant, many of these are available as plugin of the main program, in Owncloud the extensions are called “apps” and you can enable and disable them as admin in their setting page.

Encryption – With the Encryption Application enabled, all files stored on the ownCloud server are encrypted to your password. This is helpful if you store your files on an untrusted storage outside the ownCloud server. Add to this an SSL connection, and your files are secure while in motion and at rest.

Versioning – With the Versions Application enabled, ownCloud automatically saves old file versions – you configure how much to save. To revert, simply hover over your file and roll back to a previous version.

Viewer for ODF and PDF Files – Enable these 2 Application and you can click on any ODF formatted document (.odt, .odp, .ods) or PDF and read it in your web browser with no download required.

External Storage – This is an admin option, with the External Storage Application enabled, you can mount your external storage (dropbox, gdrive) as a folder inside your ownCloud instance, and use 1 interface to access all of your files.

Access via WebDAV – It’s possible to access ownCloud directly via WebDAV, Owncloud has is own DAV server and you can access it via the special url: yourserver/remote.php/webdav/ you can access it with any software that supports DAV like Konqueror or Nautilus, or mout it as filesystem with davfs2

Connect your native music player to ownCloud – You can access your music stored in ownCloud with every Ampache-compatible media player. You can find the url for your specific ownCloud installation in your personal settings.

Conclusion

I was pleasantly surprised with the ease of installation of this software and its many options,this is for sure a software that you must test if you are planning to have a company-wide file sharing server, this will allow you to have a file sharing service between devices of different types (it is in development the client for smartphones) and to share files, calendars and tasks between users.


Popular Posts:

flattr this!

  13 Responses to “How to install Owncloud on your Linux Box”

  1. Your code lines are all messed up — it looks like your blogging platform has changed a lot of your codes.

  2. quale e’ la procedura per l’installazione sul uno spazio web?
    Grazie.

    • Ciao,
      Se hai tutti i requisiti, devi scaricare l’ultima versione e metterla nella tua document root, poi fare la configurazione della parte DB.

      A questo punto andando con un browser sul tuo sito dovresti vedere la procedura di configurazione iniziale.

      Ciao

  3. ciao ho provato ad installarlo su aruba, se rinomino l’htacces parte l’installazione (altrimenti nisba), che va a buon fine ma quando entro tutto si vede come se non ci fosse un template, come se da un sito web si cancellare il file css, non so se mi sono spiegato, puoi aiutarmi?

    • Ciao,
      Io non ho avuto questo problema, che versione hai installato ?
      Se guardi i sorgenti della pagina e trovi il file .ss (tipo /owncloud/remote.php/core.css) e lo provi a caricare direttamente cosa succede ?

      Ciao

      • ciao ho installato la 4.5.2, O_o oggi c’è la 4.5.3, cosa intendi con caricare direttamente?
        ps. Owncloud è situato in una sottocartella

        • Intendo aprire un broswer e mettere la url diretta del css per vedere se viene scaricato correttamente o ci sono errori.

          Ciao

          • Ciao il file css me lo vede e per la prescisione questi dominio.xx/cloud/core/css/styles.css.
            é possibile che decommentanto l’ultima riga del file .htaccess succeda tutto questo casino?
            cmq ecco uno screenshot, http://imageshack.us/photo/my-images/259/senzatitolo1lt.png/
            su tophost non mi ha dato problemi, ma su aruba non ne vuole sapere di funzionare.
            nenache cambiando template funza

  4. Ciao ho rifatto la prova del css e /cloud/remote.php/core.css non me lo vede

  5. Sembra che a me dia qualche errore…
    MySQL username e / o password non validi
    È necessario immettere un account esistente o l’amministratore.
    e lo user e password è giusta, sapresti dirmi perche va in errrore?

    • Ciao,

      hai creato un utente mysql ed un database prima di avviare la procedura di installazione ?

  6. ho creato prima il database, poi ho creato l’utente con il seguente comando:
    grant all privileges on owncloud.* to ‘utente’@’localhost’ identified by ‘password’ with grant option;
    oltre a questo non ho fatto nulla, anche perche da manuale non mi pare che ci sia altro

 Leave a Reply

(required)

(required)


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>