It's quite easy, in fact. I have done this using a Raspberry Pi and a raspbian sd card.
The easy way is to install the owncloud package :

$>apt-get install owncloud
and you are done. However,...