Original HOWTO Install GNUsocial free social media software by-the-side of existing diaspora* pod on Debian8

Original HowTo by http://juboblo.gr #installingfreesome

  • #canworkwithoutsudo but this HowTo assumes #havesudo . Should be straightforward even #withoutsudo if existing LAMP (GNU/Linux, Apache or Nginx, MariaDB or MySQL and php) installed on the system. I used MariaDB and Nginx since the https://d.consumium.org #diaspora pod is configured to use that.
  • Normative instructions: https://git.gnu.io/gnu/gnu-social/blob/master/INSTALL

    GNU is GNU but GNU is not unikka but they do like each other a whole lot. Under Free Artist Licence – http://artlibre.org/licence/lal/en/ Click pic for credits
  • Also I read these slightly dated Debian specific instructions: https://levlaz.org/installing-gnu-social-on-a-debian-server/

Replacing MySQL with MariaDB

Following these instructions https://askubuntu.com/questions/531455/how-to-drop-in-replace-mysql-with-mariadb (written for Ubuntu14.04) blindly would have made a mess of this  but they still outline what you want to do. Since they wanted to remove the ruby specific stuff which I wanted to stay to retain diaspora* pod working.

So I shut down diaspora* processes the usual waya and MySQL with ‘mysqladmin -uroot -p stop’

The instructions say to

sudo apt-get remove --purge mysql-server mysql-client mysql-common

but I used instead

sudo apt-get remove --purge mysql-server mysql-client

Which left the ruby stuff in place which is a good idea since afaik MariaDB is binary  compatible with MySQL add-on stuff

followed by

sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get install mariadb-server

And MariaDB was up and running which I checked by ‘mysql -uroot -p’ so the downtime for the pod was only like 5 minutes for this step.


Installing the dependencies for GNUsocial

‘sudo aptitude install php5-curl php5-gd php5-gmp php5-intl php5-json php5-mysqlnd’

Installing optimizations / accelerators for GNUsocial

I went with this ‘ sudo aptitude install php5-xcache exif’

I’m not sure if php5-xcache (an opcode cache system) is what the official installation instructions refer to as ‘opcache’. At least /etc/php5/mods-available/ is showing a opcache.ini so I’m guess it was that.


 


 

Downloading GNUsocial code

‘sudo mkdir /var/www/gnusocial’

‘sudo chgrp www-data /var/www/gnusocial/’

‘sudo chmod g+w /var/www/gnusocial/’

‘sudo git clone https://git.gnu.io/gnu/gnu-social.git gnusocial/’

and you are done


Creating the database

From shell run

mysqladmin -u "root" -p create social
       GRANT ALL on social.*
       TO 'social'@'localhost'
       IDENTIFIED BY 'agoodpassword';

The command above is to be executed in the MariaDB client (start it with ‘mysql -uroot -p social’)


Get an SSL cert and key for your GNU social instance

I have not yet tried out https://letsencrypt.org/ but have heard good things about it and you cannot really beat the price of 0€. A few companies I am clientele of are supporting it financially. Mainly https://gandi.net – a very nice registrar. Good even if not the cheapest around. High sortiment of domain names and rock solid tek with the latest copyleft solutions.


Configure Apache/Nginx with the help of the example .conf files in the directory you cloned the social software into.

You can test the configuration file makes sense by

‘sudo nginx -t’

Remember to reload after editing.

‘sudo service nginx reload’


Finishing up

Once you have configured you httpd there is still one thing to do before proceeding to https://social.example.com/install.php

For some reason the installation guide did not mention that the default settings in the httpd.conf.example file expects unix:/var/run/php5-fpm.sock; to just be there.

install with

‘sudo aptitude php5-fpm’

This was how I got GNU social to work in the same box as the diaspora* pod.