From bash:
apt-get install php5 php5-gd php-xml-parser php5-intl php5-mysql smbclient curl libcurl3 php5-curl mysql-server-5.5 cd /var/www wget https://download.owncloud.com/download/community/setup-owncloud.php chown -R www-data.www-data /var/www a2enmod rewrite a2enmod headers service apache2 restart