- -Daxelor.config flag is not required is application.properties is inside the app (require if outside of WEB-INF/classes)
- url would be http://127.0.0.1:8080/axelor-erp-v5.3.3/ not only http://127.0.0.1:8080/
- maybe using tomcat 9.0.26 (.34 does not work) is better than 8.X
Dear Kumar Pathel, I have faced no issues in installation following earlier mentioned steps in Window Operating system? Did you try to install in Window? I could not comments as so for I have not installed axelor 5.3.3 in Ubuntu/Linux…
However, I am also struct in installation of ERPNEXT in ubunbu since last couple of weeks…
Hi,
There is no really trace to understand why compilation failed. I don’t really know if modules have been compiled and the failure is just about the war generation.
Could you try “./gradlew -x test war" ?
Hello Shafiq
I have no problem with Windows. The problem is installing it in Ubuntu/Fedora/Debian/Centos from the source.
Can you please try from your side to install on Ubuntu or any other Linux
Thanks
Finally I have got Ver 5.3.5 installed from the source on Ubuntu 18. Going back to the previous complications and errors, there were some stupid mistakes I have made. Also there are some minor missing steps in the documentation which I will be glad to update if I can.
Hello,
Has anyone successfully installed v5.3 on a hosted server? I have installed and tested the windows client and now I would like to test deploying a live site.
Any suggestions would be appreciated.
Thank you
Hi Kumar Pathel, Do you have a step-by-step instructions on how to install Axelor (from source) on Ubuntu you can share?
Dear Kumar,
I too appreciate if you could share the steps for Ubuntu installation.(though my actual requirement is to install it on Cent OS)
Thank you in advance.
absolutely. me too. I need to step by step installation procedure.
thank you in advance.
Axelor Ver 5.3.6 Installation in Ubuntu 18.0
Prerequisites
Install Git
Install Git
$ 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
Install OpenJDK 8
Install OpenJDK 8
$ sudo apt-get install openjdk-8-jdk
Install Tomcat 9.0.26
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 version of Tomcat 9.0.26 from the Tomcat Downloads page. Under the Binary Distributions section, copy the link to the .tar.gz
package. e.g apache-tomcat-9.0.26.tar.gz
Follow these commands:
$ cd /tmp
$ curl -O https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.26/bin/apache-tomcat-9.0.26.tar.gz
$ sudo mkdir -p /opt/tomcat
$ sudo tar -xzf apache-tomcat-9.0.26.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
$ sudo apt update
$ sudo apt install postgresql postgresql-contrib
You may also require to configure postgresql server to allow password authentication.
Example pg_hba.conf
$ sudo nano /etc/postgresql/10/main/pg_hba.conf
Replace peer to trust in # « local » is for Unix domain socket connections only. See below
# 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.
Create a database:
$ sudo su postgres
$ createdb -O axelor axelor
$ exit
A new database named axelor
is created.
Build from source OR Download directory from here
Get the latest source code of the Axelor Open Suite using Git as follows:
$ mkdir -p /tmp/axelor-source
$ cd /tmp/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 /tmp/axelor-source/axelor-erp/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.
Now copy the built WAR file « axelor-erp-5.3.6.war » from /tmp/axelor-source/axelor-erp/build/libs to this directory « /opt/tomcat/webapps/ROOT »
$ cd /opt/tomcat/webapps/ROOT
$ rm -r *
$ sudo cp /tmp/axelor-source/axelor-erp/build/libs/axelor-erp-5.3.6.war /opt/tomcat/webapps/ROOT/ROOT.war
$ sudo jar xvf ROOT.war
Now change the /opt/tomcat/webapps/ROOT/WEB-INF/classes/application.properties
by editing the file as follow:
$ sudo nano /opt/tomcat/webapps/ROOT/WEB-INF/classes/application.properties
However, you have to provide database settings like this or if you have set it up with different database name or user name and password:
db.default.driver = org.postgresql.Driver
db.default.ddl = update
db.default.url = jdbc:postgresql://localhost:5432/axelor
db.default.user = axelor
db.default.password = axelor
Create Tomcat systemd Service File
We want to be able to run Tomcat as a service, so we will set up systemd service file.
Tomcat needs to know where Java is installed. This path is commonly referred to as “JAVA_HOME”. The easiest way to look up that location is by running this command:
$ sudo update-java-alternatives -l
It should display this
Output
java-1.8.0-openjdk-amd64 1081 /usr/lib/jvm/java-1.8.0-openjdk-amd64
Your JAVA_HOME
is the output from the last column. Given the example above, the correct JAVA_HOME
for your server would be:
JAVA_HOME
/usr/lib/jvm/java-1.8.0-openjdk-amd64
With this piece of information, we can create the systemd service file. Open a file called tomcat.service
in the /etc/systemd/system
directory by typing:
$ sudo nano /etc/systemd/system/tomcat.service
Paste the following contents into your service file. Modify the value of JAVA_HOME
if necessary to match the value you found on your system « /usr/lib/jvm/java-1.8.0-openjdk-amd64 » DONE for you . You may also want to modify the memory allocation settings that are specified in
CATALINA_OPTS
:
/etc/systemd/system/tomcat.service
[Unit]
Description=Apache Tomcat Web Application Container
After=network.target
[Service]
Type=forking
Environment=JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'
ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh
User=root
Group=tomcat
UMask=0007
RestartSec=10
Restart=always
[Install]
WantedBy=multi-user.target
When you are finished, save and close the file.
Next, reload the systemd daemon so that it knows about our service file:
$ sudo systemctl daemon-reload
Start the Tomcat service by typing:
sudo systemctl start tomcat
Double check that it started without errors by typing:
sudo systemctl status tomcat
After a short time you can access the application at: http://IP-ADDRESS:8080
While waiting for the application to come up you can check the log file « catalina.out » located in /opt/tomcat/logs.
$ sudo nano /opt/tomcat/logs/catalina.out
If you want to run the application with port 80 "without 8080. Note: make sure no other http services is running.
Edit the file /opt/tomcat/conf/server.xml as follow:
$ sudo nano /opt/tomcat/conf/server.xml
and replace this par of the file the port from 8080 to 80
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
That’s all folk good luck and hope it will work for you. If not give me a buzz
this is really great, i wish if i could give more hears
@Kunar pathel…excellent now installation steps have been completed with regards to various operating systems and efforts of all friends are appreciated. Now I will suggest to move ahead toward simple customization particularly reports, print out and fields. Functional side discussion is also essential:). I have deployed QuickBooks enterprise, odoo and erpnext. So far QuickBooks enterprise seems at top in comparison of flexibility, customization, reporting, remote access and custom fields wise. What are your view point?
thank you. amazing explanation
See the [official installation doc]( See https://docs.axelor.com/abs/5.0/install/index.html). I suggest if something is missing. The doc is not up to date but still applies to latest 5.2 and 5.3 branches too.
can you share output on console I feel axelor-erp missing in url
I have the same problem , due to connecting PostgresSQL …
How did you solve it? I’m not even sure what I’m doing wrong.
With good postgres user
I don’t understand this.