X
    Categories: Tutorials

How to install Group-Office 6 on an Ubuntu 14.04 VPS

Group-Office is an easy to use, open source groupware and CRM application. It allows users to share projects, tasks, notes, files, calendars, e-mail and more with co-workers and clients through a web browser.
In this step-by-step tutorial, we will show you how to install Group-Office 6 on an Ubuntu VPS.

At the time of writing this tutorial, the latest stable version of Group-Office 6.1.25 and it requires:

  • PHP > 5.3 with mcrypt and pspell extensions enabled (latest PHP version is recommended).
  • Web Server (Apache or Nginx)
  • MySQL >= 5.3 installed on your Linux virtual server (latest MySQL version is recommended).

Upgrade your operating system software to the latest version available:

apt-get update
apt-get upgrade

Install the required packages using apt-get:

apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libapache2-mod-php5 zip libwbxml2-utils tnef php5-common php5-curl php5-gd php5-imap php5-mcrypt php5-mysql php-pear php5-pspell php5-xmlrpc

Enable the mcrypt module:

php5enmod mcrypt

Download the latest version of Group-Office available at http://sourceforge.net/projects/group-office/files/latest/download to the /opt directory on the server. Then, extract it and move the Group-Office files and directories to the ‘/var/www/html/group-office’ directory using the following commands:

cd /opt
wget http://downloads.sourceforge.net/project/group-office/6.1/groupoffice-com-6.1.25.tar.gz
tar -xvzf groupoffice-com-6.1.25.tar.gz
mv groupoffice-com-6.1.25/ /var/www/html/
cd /var/www/html/
mv groupoffice-com-6.1.25 group-office

Create a new MySQL database named groupofficedb on your server:

mysql -u root -p
mysql> CREATE DATABASE groupofficedb;
mysql> CREATE USER groupoffice@localhost;
mysql> SET PASSWORD FOR 'groupoffice'@'localhost' = PASSWORD("groupoffice-password");
mysql> GRANT ALL PRIVILEGES ON groupofficedb.* TO 'groupoffice'@'localhost' IDENTIFIED BY 'groupoffice-password' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
mysql> quit

Do not forget to change ‘groupoffice-password’ with a strong password for your ‘groupoffice’ MySQL user.

Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘groupoffice.conf’:

touch /etc/apache2/sites-available/groupoffice.conf
ln -s /etc/apache2/sites-available/groupoffice.conf /etc/apache2/sites-enabled/groupoffice.conf
vi /etc/apache2/sites-available/groupoffice.conf

then, add the following lines to ‘groupoffice.conf’ configuration file:

<VirtualHost *:80>
ServerAdmin admin@your-domain.com
DocumentRoot /var/www/html/group-office/
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory /var/www/html/group-office/>
Options FollowSymLinks
AllowOverride All
</Directory>
ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common
</VirtualHost>

Edit the ‘/etc/php5/apache2/php.ini’ PHP configuration file and add/modify the following line:

expose_php = Off

Optionally, install Ioncube loaders to enable the professional modules. Please note, if you like to use the professional modules, you need to purchase a professional license for Group-Office.

cd /opt
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar -xvzf ioncube_loaders_lin_x86-64.tar.gz
cd ioncube

Run the following commands:

php -v
PHP 5.5.9-1ubuntu4.5 (cli) (built: Oct 29 2014 11:59:10)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

php -i | grep extension_dir
extension_dir => /usr/lib/php5/20121212 => /usr/lib/php5/20121212

Copy the appropriate ioncube module to the PHP modules directory. For example, if you have PHP 5.5.x version installed on your server, copy ioncube_loader_lin_5.5.so file. If you have PHP 5.4.x version copy ioncube_loader_lin_5.4.so file etc.

cp ioncube_loader_lin_5.5.so /usr/lib/php5/20121212/

Edit the ‘/etc/php5/apache2/php.ini’ PHP configuration file and add the following line:

zend_extension = /usr/lib/php5/20121212/ioncube_loader_lin_5.5.so

Restart the Apache web server for the changes to take effect:

sudo service apache2 restart

Create a Group-Office configuration file named ‘config.php’:

touch /var/www/html/group-office/config.php

Also, create a protected directory for storage outside of the document root (e.g. /opt/group-office). This directory should not be accessible through the web server.

mkdir -p /opt/group-office

The web server user (www-data) needs to be able to write to the Group-Office files and directories inside the ‘/var/www/html/group-office’ and ‘/opt/group-office’ directories including the Group-Office configuration file (config.php), so it can easily be accomplished by executing the following commands:

chown www-data:www-data -R /var/www/html/group-office/
chown www-data:www-data /opt/group-office

Open http://your-domain.com in your favorite web browser and follow the easy instructions. Change protected files path to /opt/group-office/, fill out the regional settings, SMTP server settings, database connections settings, enter the administrator account details and click on ‘Continue’ button to create the database for Group-Office. Then, make sure ‘/var/www/html/group-office/config.php’ is not writable anymore:

chmod 644 /var/www/html/group-office/config.php

That is it. The Group-Office installation is now complete.

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install Group-Office for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.