Quick writeup on how to install the new owncloud 6 beta on your raspberry Pi.
Disclaimer: If you want something superfast, leave this site now. If you’re looking for a really cheap way to get your own cloud (No NSA. So yay!) and give some use to your raspberry pi which is sitting on the shelf since months, here you go. Just don’t expect a 1 to 1 dropbox/drive/$whatever clone.
Prequirements: Working Raspberry Pi with Raspbian (path etc. may vary on other distributions) and a running webserver with php and ssl.
Installation on the Pi
Download the package from here, extract it, move it to the right location and set the correct user rights:
pi@raspberrypi ~ $ wget http://download.owncloud.org/community/testing/owncloud-6.0.0beta1.zip
pi@raspberrypi ~ $ unzip owncloud-6.0.0beta1.zip
pi@raspberrypi ~ $ sudo mv owncloud /var/www/
pi@raspberrypi ~ $ sudo chown -R www-data:www-data /var/www/owncloud
pi@raspberrypi ~ $ cd /var/www/owncloud/
We need to change a few settings in the php config.
pi@raspberrypi /var/www/owncloud $ sudo vi /etc/php5/fpm/php.ini
Replace
upload_max_filesize = 2M
post_max_size = 8M
with
upload_max_filesize = 1024M
post_max_size = 1024M
and add some lines to the end of the file (we will install apc later):
upload_tmp_dir = /srv/www/owncloud/data/temp
extension = apc.so
apc.enabled = 1
apc.include_once_override = 0
apc.shm_size = 256
Create the directory for uploads
pi@raspberrypi /var/www/owncloud $ sudo mkdir -p data/temp
pi@raspberrypi /var/www/owncloud $ sudo chown -R www-data:www-data data
After editing your webserver config according to the documentation, visit http://localhost/owncloud or http://raspberryip/owncloud and check for error messages. In my case, I got two:
1. PHP module GD is not installed. Please ask your server administrator to install the module.
So I needed to install this:
pi@raspberrypi /var/www/owncloud $ sudo aptitude install php5-gd
And
2. No database drivers (sqlite, mysql, or postgresql) installed.
Of course. After some searching and reading the official documentation about the database configuration, I decided to use MySQL as backend. Mainly because there will be at least two persons using the system. So I installed the mysql-server and php5-mysql package.
pi@raspberrypi /var/www/owncloud $sudo aptitude install mysql-server php5-mysql
After settings the root password, connect to your mysql server. Create a user for owncloud and a database.
pi@raspberrypi /var/www/owncloud $ mysql -u root -h localhost -p
CREATE USER ‚owncloud’@’localhost‘ IDENTIFIED BY ‚password‘;
CREATE DATABASE IF NOT EXISTS owncloud;
GRANT ALL PRIVILEGES ON owncloud.* TO ‚owncloud’@’localhost‘ IDENTIFIED BY ‚password‘;
QUIT
Return to http://localhost/owncloud or http://raspberryip/owncloud and complete the setup process.
Some tips to improve performance:
There are a few guides and tips on the net on how to improve performance of owncloud on your pi. Here are some of them.
1. Install the PHP Accelerator (see modified php.ini at the top)
pi@raspberrypi /var/www/owncloud $ sudo aptitude install php-apc
2. Use a cronjob to update the database and fasten up the webinterface. Open the crontab for the webserver user:
pi@raspberrypi /var/www/owncloud $ sudo crontab -u www-data -e
For updates every 15 minutes add:
*/15 * * * * php -f /var/www/owncloud/cron.php
On the webinterface go to Administration -> Cron and change the setting to Cron.
3. Disable unused apps. Disable all apps you don’t need.
Installation of the owncloud ubuntu client
pat@think:~$ wget http://download.opensuse.org/repositories/isv:ownCloud:devel/xUbuntu_13.10/Release.key
pat@think:~$ sudo apt-key add Release.key
pat@think:~$ echo ‚deb http://download.opensuse.org/repositories/isv:ownCloud:devel/xUbuntu_12.04/ /‘ >> sudo tee /etc/apt/sources.list.d/owncloud-client.list
pat@think:~$ sudo aptitude update
pat@think:~$ sudo aptitude install owncloud-client
Sources: http://doc.owncloud.org/server/5.0/admin_manual/installation/installation_others.html#nginx-configuration http://doc.owncloud.org/server/5.0/admin_manual/configuration/background_jobs.html#cron-jobs http://doc.owncloud.org/server/5.0/admin_manual/configuration/configuration_database.html http://jankarres.de/2013/10/raspberry-pi-owncloud-server-installieren/ (german) http://cloudlog.de/owncloud-langsam-diese-tipps-machen-owncloud-schneller/ (german)