Installation for development
In this instructions we've used Ubuntu 15.10. Other platforms can work as well but you have to figure it out yourself ;)
In this example we're going to install it at /var/www/groupoffice-server. The API URL will be http://localhost/api
To install the GroupOffice server follow these steps:
Make sure you have the required software:
Install Apache, PHP, MySQL and sudo. We also need some specific extensions:
$ sudo apt-get install mysql-server libapache2-mod-php php-mysql php-curl php-zip
Install GIT and curl.
$ sudo apt-get install git curl
$ curl -sS https://getcomposer.org/installer | php $ sudo mv composer.phar /usr/local/bin/composer
clone the repository:
It's recommended to put the server outside the web server document root for security reasons.
$ cd /var/www $ git clone firstname.lastname@example.org:Intermesh/groupoffice-server.git
Run composer in the working directory. This will install all required PHP libraries:
$ cd /var/www/groupoffice-server $ composer install
You must create the web accessible access point and we do this with an apache Alias.
Create a file /etc/apache2/conf-available/groupoffice-server.conf:
Alias /api /var/www/groupoffice-server/public/index.php <Directory /var/www/groupoffice-server/public> require all granted </Directory>
Enable this config:
$ sudo a2enconf groupoffice-server $ sudo service apache2 reload
Create a MySQL database and user for GroupOffice. For example named "go7".
Here are some example commmands. If you use a root password then add -p.
$ mysql -u root -e "CREATE DATABASE go7" $ mysql -u root -e "GRANT ALL PRIVILEGES ON go7.* TO 'go7'@'localhost' IDENTIFIED BY 'secret' WITH GRANT OPTION"
Create the data folder where Group-Office can store files.
$ mkdir /var/www/groupoffice-server/data $ sudo chown www-data:www-data /var/www/groupoffice-server/data
Create config.php configuration file by copying the defaults:
$ cd /var/www/groupoffice-server $ cp config.php.example config.php
Set the correct database parameters and data storage path created in step 6 + 7.
Now it should work. Launch the API:
This will redirect to a system test page:
It should output that all is OK ;). It doesn't look pretty but it's not meant to be because it's just an API.
Open http://localhost/api/system/install to install the database.
Install command line wrapper script Create the file /usr/local/bin/groupoffice and put this in:
#!/bin/bash sudo -u www-data /var/www/groupoffice-server/bin/groupoffice $@
Make this file executable:
sudo chown +x /usr/local/bin/groupoffice
This allows you to run command line actions easily. For example:
Install cron job in /etc/cron.d/groupoffice-server :
* * * * * www-data /usr/local/bin/groupoffice cron/run
Read the Usage chapter about how to login and use the API.
The default login is:
Username: admin Password: Admin1!
Updating, When you want to update use these commands:
$ git pull $ composer update $ groupoffice system/upgrade
Create a second command to run CLI as the current user:
ln -s /var/www/groupoffice-server/bin/groupoffice /usr/local/bin/sugroupoffice