Advertisement
Guest User

Gryphon's very rough guide to installing Friendica on a RPi

a guest
Sep 24th, 2016
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.02 KB | None | 0 0
  1. Gryphon's very rough guide to installing Friendica on a raspberry pi (or other Debian box, should be similar...)
  2. Some steps pulled from guides, and youtube things. It works, but I assume you understand a little about *nix
  3. When installing, make sure the IP of your box is the IP address you're going to use.
  4.  
  5. ( raspberry pi 3 - pretty durn good, but not the peppiest of frogs. )
  6. ( raspberry pi B - do not attempt, it's too slow. I WARNED YOU AND NOW LOOK WHAT YOU DID! )
  7. ( most of this shit run as root )
  8.  
  9. apt-get install
  10. apt-get upgrade (may need to do dist-upgrade instead)
  11.  
  12.  
  13. sudo su
  14. apt-get install apache2 php5 mysql-server git # main depends
  15. apt-get install php5-curl php5-gd php5-mysql php5-mcrypt php5-imagick php5-imap # everthing else
  16. apt-get install ssmtp mailutils mpack
  17.  
  18. (Thanks to YouTube user Ww w for some of these steps)
  19.  
  20. cd /var/www
  21. git clone https://github.com/friendica/friendica.git friendica
  22. chown www-data:www-data friendica -R
  23. mysql -u root -p
  24. create user 'friendica'@'localhost' identified by 'mypass'; < -choose something else here for passwords, please!
  25. grant all on friendica_dev.* to 'friendica'@'localhost';
  26. grant all on friendica_prod.* to 'friendica'@'localhost';
  27. flush privileges;
  28. create database friendica_dev default character set utf8 default collate utf8_general_ci;
  29. create database friendica_prod default character set utf8 default collate utf8_general_ci;
  30. quit;
  31.  
  32. nano /etc/hosts
  33. (add this to the end of the file)
  34. 127.0.0.1 node.localdomain
  35.  
  36. cd /etc/apache2/sites-available
  37. cp 000-default.conf node.localdomain.conf
  38. nano node.localdomain.conf
  39. ( comment out any uncommented lines in the conf file and add this to the end )
  40. ( alternately start with a fresh file but I'd rather keep the old stuff there for ref )
  41.  
  42. <VirtualHost *:80>
  43. ServerName node.localdomain
  44. ServerAdmin webmaster@localhost
  45.  
  46. DocumentRoot /var/www/friendica
  47. <Directory />
  48. Options FollowSymLinks
  49. AllowOverride None
  50. </Directory>
  51.  
  52. <Directory /var/www/friendica>
  53. Options Indexes FollowSymLinks MultiViews
  54. AllowOverride all
  55. Order allow,deny
  56. allow from all
  57. </Directory>
  58.  
  59.  
  60.  
  61. ErrorLog ${APACHE_LOG_DIR}/friendica-error.log
  62. LogLevel warn
  63. CustomLog ${APACHE_LOG_DIR}/friendica-access.log combined
  64. </VirtualHost>
  65.  
  66. (save and exit)
  67.  
  68. cd /etc/apache2/sites-enabled
  69.  
  70. cp /etc/apache2/sites-available/node.localdomain.conf /etc/apache2/sites-enabled/node.localdomain.conf
  71. chmod 755 node*
  72. rm 000-default.conf
  73. a2enmod rewrite
  74. /etc/init.d/apache2 restart
  75. cd /etc/ssmtp
  76. ( add your mailserver settings to the end of the file )
  77. ( https://www-users.cs.york.ac.uk/~mjf/printer/src/SMTP.html )
  78. ( change the real name of all users involved and edit revaliases so email comes from yourserver )
  79.  
  80. AuthUser=user@gmail.com
  81. AuthPass=userpassword
  82. FromLineOverride=YES
  83. mailhub=smtp.gmail.com:587
  84. UseSTARTTLS=YES
  85.  
  86. ( Alternately, use some other mail server )
  87. ( Save file and exit )
  88.  
  89. cd /etc/php5/apache2
  90. nano php.ini
  91. ( locate [mail function] section )
  92. ( uncomment sendmail_path )
  93. sendmail_path = /usr/sbin/sendmail
  94.  
  95. ( uncomment and add a mail log if you want )
  96. ( Save file and exit )
  97. ( https://www.conetix.com.au/support/article/simple-php-mail-test )
  98.  
  99.  
  100.  
  101. exit
  102. crontab -e
  103. ( select your editor if this is a new install and add the next lines to the end of the file )
  104. mailto=YOUREMAILFORERRORMSGS@youremailaddy.com
  105. */10 * * * * cd /var/www/friendica; /usr/bin/php include/poller.php
  106. ( save the file and exit note you don't need the email, but it's good practice so you can see if anything broke )
  107.  
  108.  
  109.  
  110. ( https://github.com/rsyslog/rsyslog/issues/35 ) rsyslog problem
  111.  
  112. http://yourwebsite/ (will run install)
  113. Make sure all is green on first page
  114. database: user is "friendica", db is "friendica_prod" and password is "mypass" (whatever you chose here, don't use mypass!)
  115.  
  116. First registration needs to be the email you gave during setup. don't log in, actually register!
  117.  
  118. after you are in the main site:
  119.  
  120. sudo /etc/init.d/cron restart
  121.  
  122. ( starts the poller )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement