Friendica on the Raspberry Pi

This is probably out of date and there are probably better single-board-computers to install on.


At first I tried using Friendica image on Raspberry Pi, this turned out to be too slow: Make sure you have xserver installed.
apt-get install qemu unzip
wget http://downloads.friendica.eu/Friendica.zip
unzip Friendica.zip
rmmod nbd #check if the nbd module is loaded
modprobe nbd max_part=16 #attach the nbd module if not with max 16 partitions
qemu-nbd -c /dev/nbd0 Friendica.vdi #mount the vdi at /dev/ndb0
qemu -m 256 -cpu 486 -hda /dev/ndb0 #run qemu
qemu-nbd -d /dev/nbd0 #unmount the vdi at /dev/ndb0

So then I went about installing friendica natively on the Raspberry Pi:

#download dependencies
sudo apt-get install php5 apache2 mysql-server php5-curl smarty3
#get friendica
wget https://github.com/friendica/friendica/archive/master.zip #note this
could probably be downloaded via git

#unzip
unzip master.zip

#copy to your server
cp -R friendica-master /var/www/friendica

#login to mysql
mysql -u username -p

#create a new database called friendica
create database friendica;

#At the MySQL prompt, set the permissions using the following command:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES, CREATE TEMPORARY TABLES ON friendica.* TO user@localhost IDENTIFIED BY ‘password’;

#use the new permissions
FLUSH PRIVILEGES;

#exit mysql cli
exit

#add allow www-data write access to /var/www/friendica/view/smarty3
chown user:www-data /var/www/friendica/view/smarty3
chmod g+w /var/www/friendica/view/smarty3

#make a new .htconfig.php file
touch /var/www/friendica/.htconfig.php

#allow read writing and execution for this file:
chown user:www-data /var/www/friendica/.htconfig.php
chmod g+rwx /var/www/friendica/.htconfig.php

#edit /etc/apache2/sites-enabled/000-default and change AllowOverride to All

#continue with the installation from your domain name, not from the local ip address.

#finally run
crontab -e

#and add following line to the file:
*/10 * * * * /usr/bin/php /var/www/friendica/include/poller.php

Job Done