Install on macOS

In this guide we will see how to install Axelor Business Suite on your system by installing all the prerequisites and building Axelor Business Suite from the source code.


Install Git

We will use Git to obtain latest source code of Axelor Business Suite from the public source repository.

There are several ways to install Git on a Mac. The easiest is probably to install the Xcode Command Line Tools. On Mavericks (10.9) or above you can do this simply by trying to run git from the Terminal the very first time.

Refer the git documentation for more details.

Install OpenJDK 8

Download the latest OpenJDK 8 and install it as per the installation instructions.

Install Tomcat 8.5

Here we will see how to install the latest Tomcat 8.5 from the binary distribution package.

Download the latest version of Tomcat 8.5 from the Tomcat Downloads page. Under the Binary Distributions/Core section, use the .tar.gz package.

It’s better to install it under /usr/local or /Library directory.

Follow these commands:

$ cd /Library
$ sudo mkdir /Library/Tomcat
$ sudo tar -xzf ~/Downloads/apache-tomcat-*.tar.gz -C /Library/Tomcat --strip-components=1
$ sudo chown -R <user_name> /Library/Tomcat (1)
$ sudo chmod +x /Library/Tomcat/bin/*.sh (2)
1 change the ownership to the non-privileged user
2 make the shell scripts executable

Install PostgreSQL

We will install PostgreSQL as the database system for the Axelor Business Suite.

Download the latest installer package and install as usual.

Build from source

Get the latest source code of the Axelor Business Suite using Git as follows:

$ mkdir -p ~/axelor-source
$ cd ~/axelor-source

$ git clone axelor-erp
$ sed -e 's|||' -i axelor-erp/.gitmodules

$ cd axelor-erp
$ git checkout master
$ git submodule sync
$ git submodule init
$ git submodule update
$ git submodule foreach git checkout master
$ git submodule foreach git pull origin master

Now build the war package from the source:

$ ./gradlew -x test build

After build completion, you will find the war package under build/libs directory.

Deploy the App

Now as the war package is built, it’s time to run the app by deploying it on Tomcat.

First prepare a database named axelor using the graphical tool pgAdmin4 installed with the installer.

Now prepare an application config file.

$ cp ~/axelor-source/axelor-erp/src/main/resources/ /Library/Tomcat/ (1)
$ sed 's|{}/axelor|{user.home}/.axelor/axelor-erp/5.0|g' -i /Library/Tomcat/ (2)
1 copy the source configuration
2 fix file storage path

Now change the /Library/Tomcat/ according to your needs. However, you have to provide database settings like this:

db.default.driver = org.postgresql.Driver
db.default.ddl = update
db.default.url = jdbc:postgresql://localhost:5432/axelor (1)
db.default.user = postgres (2)
db.default.password = axelor (3)
1 the database connection url
2 the database user name
3 the database user password

Now deploy the war package:

$ cp ~/axelor-source/axelor-erp/build/libs/axelor-erp-*.war /Library/Tomcat/webapps/ROOT.war
$ JAVA_OPTS=-Daxelor.config=/Library/Tomcat/ /Library/Tomcat/bin/ run

If everything is fine, you can see application log on terminal. After a while, you may see something like this:

Ready to serve...

The application is now ready and can be accessible at: http://localhost:8080