Skip to main content

Building BlueMind

The BlueMind source code is compiled by a continuous integration server, and binary installers are downloadable from our site to make the process as simple as possible. However, it is possible to compile BlueMind manually by following the instructions below.

Prerequisites

Compilation must be performed using Java 21.

Fetching and building code

The BlueMind code is published here: https://gitlab.bluemind.net/bluemind-public/bluemind. It is a public copy of our internal repository which follows the following guidelines:

  • master branch: main development
  • dev/X branches: base branches for future X.Y.Z release (for instance dev/4 for BlueMind 4.1.3)
  • the latest releases are tagged on the release branches

To fetch and build the code:

git clone --depth 1 --branch release/4.9 https://gitlab.bluemind.net/bluemind-public/bluemind.git
cd bluemind
mvn clean install -Dmaven.test.skip=true

All BlueMind binary artifacts will be installed in your local maven repository.

Dependencies

BlueMind packages depend on bm-cyrus and bm-nginx.

bm-nginx

git clone https://forge.blue-mind.net/stash/scm/bm/bm-nginx.git
cd bm-nginx
./ci/build_nginx.sh

Environment

Installing packages on a server that meets the prerequisites is not enough to have a working BlueMind installation. The following steps must additionally be performed by the bm-installwizard package included in the installers.

bm.ini configuration file

The file /etc/bm/bm.ini must be created with the following content (to be tuned to your configuration):

[global]
external-url = your-domain.com
external-protocol = https
host = <YOUR SERVER IP>
dbtype = PGSQL
db = bj
user = bj
password = "bj"

Postgresql database

The following instructions are related to postgresql 9.4, to be tuned to your DBMS version.

We propose a configuration that you can adapt to your needs. Replace the following files in /etc/postgresql/9.5/main/:

-->pg_hba.conf

-->postgresql.conf

The postgresql.conffile must be edited to set the value of max_connections option. The recommended value being: <NB CORES> * 10 + 10

The database corresponding to the builder version may be downloaded at the following address: http://pkg.blue-mind.net/db/

The following commands use the example of version 3.0.23, and must be adapted to your postgresql configuration:

sudo -u postgres psql
create user bj with password 'bj';
create database bj;
grant all privileges on database bj to bj;
\q
sudo -u postgres psql bj < 3.0.23.sql

Insert host information in database :

sudo -u postgres psql
insert into host (host_domain_id, host_timeupdate, host_timecreate, host_name, host_ip) values (1, now(), now(), 'bluemind', '<ip_hote>');
insert into hosttag (tag_id, host_id) values ((SELECT id from systemtag where name='bm/core'), 1);
\q

Restart BlueMind:

bmctl restart

Finally, we recommend that you set the value kernel.shmmax=300000 in /etc/sysctl.conf.

nginx configuration

The bm-webmail and bm-client-access files (in /etc/nginx/sites-available folder) must be edited to replace all  "${externalUrl}" occurences with the server external URL (as specified in bm.ini), then symlinked to /etc/nginx/sites-enabled.

Then just restart your nginx server to enjoy your new BlueMind system!