Install on Linux
The traditional way to try Axelor Open Suite on your system is to install all the prerequisites and configure them properly. Build the Axelor Open Suite from source to produce a war package and deploy on tomcat server.
Prerequisites
-
PostgreSQL 9.4 or later
Install Git
Install Git on your favourite Linux distribution, follow these steps:
On Debian based system (i.e. Debian, Ubuntu etc.):
$ sudo apt-get install git
For Ubuntu, this PPA provides the latest stable upstream Git version
$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt-get update
$ sudo apt-get install git
On Fedora based system (i.e. Fedora, CentOS, RHEL etc.):
$ sudo dnf install git
On Arch Linux:
$ sudo pacman -S git
Install OpenJDK 8
Install OpenJDK 8 on your favourite Linux distribution’s official package manager.
On Debian based system (i.e. Debian, Ubuntu etc.):
$ sudo apt-get install openjdk-8-jdk
On Fedora based system (i.e. Fedora, CentOS, RHEL etc.):
$ sudo dnf install java-1.8.0-openjdk-devel
On Arch Linux:
$ sudo pacman -S jdk8-openjdk
Install Tomcat 8.5
There are several ways to setup Tomcat on your system. Here we will see how to install the latest Tomcat 8.5 from the binary distribution package.
For security purposes, Tomcat should be run as an unprivileged user (i.e. not root).
First create a new tomcat
group:
$ sudo groupadd tomcat
Now create a new tomcat
user:
$ sudo useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat
Now, download the latest version of Tomcat 8.5 from the Tomcat Downloads page.
Under the Binary Distributions section, copy the link to the .tar.gz
package.
Follow these commands:
$ cd /tmp
$ curl -O https://www-eu.apache.org/dist/tomcat/tomcat-8/v8.5.42/bin/apache-tomcat-8.5.42.tar.gz
$ sudo mkdir -p /opt/tomcat
$ sudo tar -xzf apache-tomcat-*.tar.gz -C /opt/tomcat --strip-components=1
Now fix permissions:
$ cd /opt/tomcat
$ sudo chgrp -R tomcat /opt/tomcat
$ sudo chmod -R g+r conf
$ sudo chmod g+x conf
$ sudo chown -R tomcat webapps/ work/ temp/ logs/
Install PostgreSQL
See PostgreSQL download page for more detailed information about installation process.
You may also require to configure postgresql server to allow password authentication.
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
Once PostgreSQL is configured, create a new database user with password:
$ sudo su postgres
$ createuser axelor --no-createdb --no-superuser
$ psql -c "alter user axelor with encrypted password 'axelor'";
A new PostgreSQL user axelor
is created with the given password. The password
used here is just for demonstration. Use your own strong password.
Build from source
Get the latest source code of the Axelor Open Suite using Git as follows:
$ mkdir -p ~/axelor-source
$ cd ~/axelor-source
$ git clone https://github.com/axelor/open-suite-webapp.git axelor-erp
$ sed -e 's|git@github.com:|https://github.com/|' -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:
$ sudo su postgres
$ createdb -O axelor axelor
$ exit
A new database named axelor
is created.
Now prepare an application config file.
$ sudo cp ~/axelor-source/axelor-erp/src/main/resources/application.properties /opt/tomcat/application.properties (1)
$ sudo sed 's|{java.io.tmpdir}/axelor|{user.home}/.axelor/axelor-erp/5.0|g' -i /opt/tomcat/application.properties (2)
1 | copy the source configuration |
2 | fix file storage path |
Now change the /opt/tomcat/application.properties
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 = axelor (2)
db.default.password = axelor (3)
1 | the database connection url |
2 | the database user name, as we created previously |
3 | the database user password, as we set previously |
$ sudo cp ~/axelor-source/axelor-erp/build/libs/axelor-erp-*.war /opt/tomcat/webapps/ROOT.war (1)
$ sudo chown tomcat:tomcat /opt/tomcat/webapps/ROOT.war (2)
$ sudo su -c "JAVA_OPTS=-Daxelor.config=/opt/tomcat/application.properties /opt/tomcat/bin/catalina.sh run" tomcat (3)
1 | copy the war package as ROOT.war so that we can access the app without context path |
2 | fix permissions |
3 | run the tomcat server and specify external config file using axelor.config java property |
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