Raspberry Pi SOGo Groupware: Difference between revisions

From WickyWiki
mNo edit summary
mNo edit summary
Line 2: Line 2:
[[Category:Linux]]
[[Category:Linux]]
[[Category:20171229]]
[[Category:20171229]]
= Start =


There are no binaries available for the ARM architecture as are needed for the Raspberry Pi. The code is not maintained for this purpose but it is possible. Therefore we need to compile, build and install the application manually.
There are no binaries available for the ARM architecture as are needed for the Raspberry Pi. The code is not maintained for this purpose but it is possible. Therefore we need to compile, build and install the application manually.
Line 8: Line 10:
* https://lists.inverse.ca/sogo/arc/users/2016-07/msg00063.html
* https://lists.inverse.ca/sogo/arc/users/2016-07/msg00063.html


= Assumptions =
Assumptions:
 
* Apache2 (2.4+) is installed
* Apache2 (2.4+) is installed
* MariaDB (MySQL) is installed
* MariaDB (MySQL) is installed
Line 16: Line 17:
= Compile, build and install =
= Compile, build and install =


== Download sourcecode ==
== Download source-code ==


Get and extract sourcecode of SOPE and SOGo (the version used here is 3.2.10):
Get and extract source-code of SOPE and SOGo (the version used here is 3.2.10):


<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>

Revision as of 18:51, 29 December 2017


Start

There are no binaries available for the ARM architecture as are needed for the Raspberry Pi. The code is not maintained for this purpose but it is possible. Therefore we need to compile, build and install the application manually.

Source with some pointers:

Assumptions:

  • Apache2 (2.4+) is installed
  • MariaDB (MySQL) is installed
  • There is no information here concerning the creation of the sogo database tables

Compile, build and install

Download source-code

Get and extract source-code of SOPE and SOGo (the version used here is 3.2.10):

cd ~
wget https://sogo.nu/files/downloads/SOGo/Sources/SOPE-3.2.10.tar.gz
tar -xvzf SOPE-3.2.10.tar.gz
wget https://sogo.nu/files/downloads/SOGo/Sources/SOGo-3.2.10.tar.gz
tar -xvzf SOGo-3.2.10.tar.gz
mv SOGo-3.2.10 SOGo

Install needed packages for SOPE

# the GNU Objective-C compiler (gcc-objc)
sudo apt-get install gnustep-make #20Mb
sudo apt-get install gnustep-core-devel #34Mb
# the libxml2 development headers (74Mb)	
sudo apt-get install libxml2-dev
sudo apt-get install libwbxml2-dev 
# the OpenLDAP development headers (2mb)
sudo apt-get install libldap2-dev
# the OpenSSL development headers (10Mb)
sudo apt-get install libssl-dev 
# the PostgreSQL development headers (1Mb)
sudo apt-get install libpq-dev
# the MySql (MariaDB) development headers (6Mb)
# sudo apt-cache search mysql | grep "dev"
sudo apt-get install libmariadbclient-dev-compat

Compile and install SOPE

cd ~/SOPE
./configure --with-gnustep --enable-debug --disable-strip --prefix=/usr/System

sudo make uninstall
make clean
make
sudo make install

Install additional needed packages for SOGo

# the libmemcached development headers (2Mb)
sudo apt-get install libmemcached-dev 	
# the libcurl development headers (1Mb)
sudo apt-get install libcurl4-openssl-dev

Compile and install SOGo

cd ~/SOGo
./configure --enable-debug --disable-strip --prefix=/usr/System

sudo make uninstall
make clean
make
sudo make install

Post installation

The install script silently fails to execute some tasks, probably because there are no specific instructions for the Raspbian OS and ARM architecture. The following statements are based on the install scripts and documentation:

Create user and group 'sogo'

#Create group
sudo addgroup sogo
#Add new user 'sogo' to group 'sogo' (error if user sogo exists)
sudo useradd -g sogo sogo
#Add existing user 'sogo' to group 'sogo'
sudo adduser sogo sogo

Copy some files to the right places

cd ~/SOGo
sudo install -D -m 644 Scripts/sogo-default /etc/default/sogo
sudo install -D -m 644 packaging/debian/sogo.overrides /usr/share/lintian/overrides/sogo	
sudo install -D -m 644 Apache/SOGo.conf /etc/apache2/conf-available/SOGo.conf
sudo install -D -m 644 Scripts/sogo.cron /etc/cron.d/sogo
sudo install -D -m 644 Scripts/logrotate /etc/logrotate.d/sogo
sudo install -d -m 750 /etc/sogo/
sudo install -D -m 640 Scripts/sogo.conf /etc/sogo/sogo.conf

Apply owner and group information

sudo mkdir /var/log/sogo
sudo mkdir /var/run/sogo
sudo chown -R sogo:sogo /var/run/sogo
sudo chown -R sogo:sogo /var/log/sogo
sudo chown -R sogo:sogo /usr/lib/GNUstep/SOGo
sudo chown -R sogo:sogo /etc/sogo

Install Service

For installation of the service we use the file './SOGo/Scripts/sogo-systemd-redhat':

cd ~/SOGo
sudo install -D -m 644 Scripts/sogo-systemd-redhat /lib/systemd/system/sogo.service
sudo systemctl daemon-reload
sudo systemctl enable sogo

Other configuration

See:

And maybe also:

Start the Service

sudo service sogo restart

Trouble shooting

/var/run/sogo/sogo.pid

The folder '/var/run/sogo' keeps being removed between reboots. This results in the following error while trying to start SOGo:

sogo.service: PID file /var/run/sogo/sogo.pid not readable (yet?) after start: No such file or directory

sudo ls -l /var/run/sogo
sudo mkdir /var/run/sogo
sudo chown -R sogo:sogo /var/run/sogo
sudo service sogo restart

Logging

SOGo service status:

service sogo status

Apache service status:

service apache2 status
sudo ls -l /etc/sogo

SOGo log:

tail -20 /var/log/sogo/sogo.log
ls -l /var/log/apache2
sudo tail -20 /var/log/apache2/error.log | grep SOGo
sudo tail -20 /var/log/apache2/access.log | grep SOGo
sudo tail -20 /var/log/apache2/other_vhosts_access.log | grep SOGo

/etc/sogo/sogo.conf

This file need to be readable by user 'sogo', but not by others. If you edit this file as root you need to reapply owner and group:

sudo chown -R sogo:sogo /etc/sogo

Apache2

Make sure you have enabled all necessary modules.

sudo a2enmod headers
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod headers
sudo a2enmod rewrite
sudo a2enmod ssl

If there is some sort of problem with the web service it could pay off to temporary increase the log level. For example, with the Apache configuration file 'raspberrypi.conf':

sudo nano /etc/apache2/sites-available/raspberrypi.conf

<blockqoute>

...
LogLevel debug
...

</blockqoute>

sudo service apache2 restart

More info: