Installing Axelor ERP
(uninstallable faux-OpenSource ERP)

If you just want to privately try this system this is the minimum, but a server reboot erases all changes made:

On a fresh server, try running the command sudo docker run -it -p 8080:80 axelor/aio-erp then waiting a long time for it to finish. I think it should do it.

At the end of the detailed instructions below after many failed attempts to get it running from Github, I discovered the command above wouldn't run till I shut off Apache, NginX, AND Tomcat!

I installed this once and it worked. I pulled in the demo data and it was such a mess that couldn't be deleted that I thought I would try again.

Between the three days that I tweeted to Axelor that I got it figured out and the day I decided to try again, they changed the version of the github code.

I was never able to get it to work again.

The two videos I watched that got me through the installation are below, but they can't be followed precisely because all systems are different. You may have to pause a lot to see what will get you through the installation. Scroll past the videos and you'll see the commands I ran from finishing the Ubuntu OS install to opening Axelor.

I'm running it on an old small form factor HP with Ubuntu Server 20.04 LTS. I put the OS on with only the prerequisite of OpenSSH checked to install from the software list. I did this because I only manage my servers with the Webmin or Virtualmin software options. They're both nice GUI webpage-type interfaces for managing a server.

I also named my machine MyERP (myerp) just to make things handy inside my network; e.g. http://myerp/axelor/login.jsp is how I access the final system while at home or when OpenVPN connecting to my home network.

These first commands are for the Webmin software:

I'm starting here assuming you have a type of Ubuntu server OS installed on a machine. At this stage the only way to communicate with your server is to be at it's physical keyboard & screen, or to SSH into it with some terminal type console window (CMD for Windows OS). If you named your server myerp , named it's admin erpadmin and you are using a normal computer to access it, in the terminal window type ssh erpadmin@myerp and hit enter. If it looks like an error occured you can use the internal IP that you saw while installing the OS, like this, ssh erpadmin@192.168.1.184.

The first login always asks you to approve the key for encryption so just answer yes. then put in the password you made for that admin. After you're in, do the following:

  • sudo nano /etc/apt/sources.list (note that the first use of SuDo has you enter the admin password again)
    then add these lines at the bottom of the file,
    # I put this next line in here
    deb http://download.webmin.com/download/repository sarge contrib

    Ctrl+X says leave the Nano file editor, then answer "Y"es to save the changes, then press your enter key to finish.
    ...OR...
    Ctrl+O then [Enter], then Ctrl+X, which is, write out the changes, and leave.

  • sudo wget http://www.webmin.com/jcameron-key.asc

  • sudo apt-key add jcameron-key.asc

  • sudo apt-get update

  • sudo apt-get install -y apt-transport-https

  • sudo apt-get install -y build-essential

  • sudo apt-get install -y libdbi-perl libdbd-pg-perl libhtml-entities-numbered-perl libhtml-html5-entities-perl libtest-exception-perl libmodule-build-perl libwrap0 libwrap0-dev mcrypt libmcrypt-dev zip unzip zip unzip

  • sudo apt-get -y install webmin

  • sudo apt update

  • sudo apt -y upgrade

  • sudo apt -y autoremove

  • sudo reboot now

At this point (after the server is all the way on again), you should be able to go to http://myerp:10000/ and log in on Webmin with whatever username & password (erpadmin : df54kh5jc6ud) you made when installing the operating system. Since Webmin uses the "snakeoil" private key for secure websites, you will get the warning pages in a browser. Click the thing for advanced, then look for the thing for accept the risks and click it too.

You will need this also, but I thought I would give you a way to use Webmin instead of command lines to do things.

  • sudo apt-get install -y -f openjdk-8-{jdk,doc,dbg,source}
    ...OR...
    go to
    the software package manager (System -> Software Packages), and click the radio-button for "Package from APT", then put
    openjdk-8-jdk openjdk-8-doc openjdk-8-dbg openjdk-8-source
    in the text box, and click the button for
    [Install]. It loads the final list of all the dependancies for your approval, then when you click [Install] again it does it.

Here is how to put the PostgresSQL database software on your system

  • sudo sh -c 'echo "deb https://www.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list
    So that fancy statement says to (
    >) make a new file called pgdg.list and fill it with the data between the quote marks ("). Without that info in that file your server won't find the version 11 that Axelor says is stable.
    ...OR...

  • sudo pico /etc/apt/sources.list.d/pgdg.list

...OR...
You could have also made a file with the Webmin's Filemin app.

  • wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
    ...OR...
    Using Filemin, you can download from a remote URL into the current directory on the screen in your browser, and Webmin has a really cool shell window with the icon
    >_ both in the top right corner of the Filemin screen and near the logout button of the left-side-panel. You would execute the "sudo apt-key add" part after downloading that key. In the Webmin shell you don't need to use the sudo (Super User Do) to run commands because it is the Super User's shell.

  • sudo apt-get update

  • sudo apt install -y postgresql-11 (note they recommend 11 as it's stable for them)
    ...OR...
    Go to the bottom of the left-side-panel's
    Webmin tab, click "Un-used Modules" then find and click the "PostgreSQL Database Server" option. Follow the prompts after that. As of writing this, that method installs the version 12.

    The PostgreSQL server is running now so stop it before altering this file.
    You can edit it by clicking the button for
    [Allowed Hosts] that appears below the [Start PostgreSQL Server] button. Merely click on the "Local connection" links for "All users" and change the "Authentication mode" from "(*) Network peer" to "(*) No authentication required" or "(*) MD5 encrypted password"; I think the last one is the best choice.
    ...OR...

    • sudo pico /etc/postgresql/11/main/pg_hba.conf

      • Change the lines at the bottom of the file from
        local all all peer
        local replication all peer

        to
        local all all trust
        local replication all trust

        ...OR... to
        local all all md5
        local replication all md5


        Also, you can edit files directly in the Filemin part of Webmin (Tools -> File Manager), the vertical 3 dots near the start of a files row (appears while mousing over the row), gets you to options for a file. It's much easier for me to edit that way thatn with the pico or nano text editors in a terminal window.

  • sudo systemctl enable --now postgresql
    ...OR...
    if you used Webmin to install PostGreSQL, just click the button to start the server, but it's probably already running.

If that Webmin PostgreSQL module doesn't show up in the Servers section in the left side panel, click the option at the bottom for "Refresh Modules".


Then you need to give Axelor a place to store things

  • sudo su postgres

    • createuser axelor-db --no-createdb --no-superuser

    • psql -c "alter user axelor-db with encrypted password 'CHANGE-THIS-TO-A-PASSWORD'";

    • createdb -U axelor-db -h localhost axelor-open-suite

    • exit

...OR...

  • sudo -iu postgres

    • createuser --interactive -P axelor-db

    • CHANGE-THIS-TO-A-PASSWORD

    • CHANGE-THIS-TO-A-PASSWORD

    • n

    • n

    • y (maybe? or possibly n?)

    • exit

  • createdb -U axelor-db -h localhost axelor-open-suite

    • your-chosen-password (for the postgres user)

...OR...

Use the Webmin interface for Postgresql to create a user and a database; user first in the section for "PostgreSQL Users" section, then back at the main page click "Create a new database" and make that new user the "Owned by user" of it. It doesn't have to be the names used above, but that is convenient.

Right now you probably have lingering sudo priveledges lingering around so do one of the following to freshen things up before starting the Tomcat part:

  • sudo reboot now

  • logout


This is for adding NginX: (a requirement for the Docker installation method)

To prevent geting any possible error about a missing "HTML::Entities module" package from the Perl modules set you need to drop to the Cpan shell in a terminal window, sudo perl -MCPAN -e shell. (It might ask you to permit it to configure itself, type yes, then [Enter]) your goal is to see the "cpan[1]> " prompt waiting for you then type "install HTML::Entities" and hit [Enter].

At the top of the left-side-panel of the Webmin or Dashboard panels is a primary section for Webmin, click it to expand that section and then select the option for Webmin Configuration by clicking it. The main screen now displays a lot but righ tnow just click on the "Webmin Modules". Click the radio button for "( ) Third party module from" and put this in the text box"
https://www.justindhoffman.com/sites/justindhoffman.com/files/nginx-0.10.wbm_.gz
After clicking the button for [Install Module], follow the prompts for what to do next.

Check the Servers -> NginX webserver app's status. If it's still in error mode, reboot your server. If you click the triangle (Start Server button) in the top right corner and it doesn't start or says the init.d/nginx file isn't there, then NginX failed to install. Use one of the many methods noted above to install nginx nginx-common nginx-core nginx-doc on the server. It should be running immediately after that install.

This is for putting on the Tomcat server as I wanted it to be:
(
note: they require 8.5.75 because it's stable with their system)

The Axelor videos show installing via download, but you can get it via Webmin. First I'm listing the commands as shown in the videos.

  • cd

  • mkdir opt

  • cd opt

  • curl -LO https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.75/bin/apache-tomcat-8.5.75.tar.gz

  • ar axvf apache-tomcat-8.5.75.tar.gz

  • rm -rf apache-tomcat-8.5.75.tar.gz

  • mv ./apache-tomcat-8.5.75/ ./default-tomcat

  • cd default-tomcat/webapps

  • rm -rf *
    It should be noted here that this
    rm command wiped out al the Tomcat web-interfaced management software. The ERP can simultaneously run while those sites are available. Mainly putting Axelor in the root later makes it the site that comes up for http://myerp:8080/ instead of the Tomcat welcome screen and it's buttons for http://myerp:8080/manager, and host-manager, and examples, and docs.
    Alternatively you can just move the contents in the
    ROOT subfolder to a new one called something like tom. Later put the Axelor WAR file into ROOT and all should be well. The Tomcat welcome page would then be at http://myerp:8080/tom.

To do it with Webmin, first go to this page in your browser: https://myerp:10000/webmin/edit_mods.cgi?xnavigation=1 then click the radio button for "Third Party System" and put this content in the text box,
http://github.com/cited/Tomcat-Webmin-Module/raw/master/scripts/tomcat.wbm.gz
After clicking the button for
[Install Module], you can just follow the prompts. It will give you prompts to install:

  • Java (17) whereas the video's show it installing (8), so you can choose the version based on the drop-down.

  • haveged which is a random number generator for various reasons.

  • Tomcat (9), but they specified 8.5.75 specifically, so switch the "Tomcat Major Version" from 9 to 8, then you can find version 8.5.75 in the dropdown for "Apache Archive". I'm not certian if upgrading Tomcat is safe to do because I don't have time to test everything, but I reccomend not upgrading Tomcat if it asks you to.

  • Apache (2), but in the case of Axelor, Apache isn't necessarily needed so we will install it now to get the Webmin app to work right, and then stop it later so it doesn't restart on it's own.

  • The Apache Proxy too is needed for the Tomcat manager app, so put it on also.

In that left-side-panel, there's a section for System, and at the top of its subsection is Bootup and Shutdown; select that. Near the top of all the services you should see:

Axelor Apache sleepy time

Check all the boxes on your Webmin screen, then scroll to the bottom of that screen. You'll be looking for the button [Disable Nowand On Boot], and click it. Docker wants to run through NginX and use Tomcat, so this is how im doing it.

While you're still in that section, take note that Tomcat isn't going to auto start after a reboot. Go ahead and adjust that to auto start.

This is the set of things to do for building and deploying Axelor: (Docker style)

A strange part is at the end, they just put the WAR file in the directory for /home/tomcat/apache-tomcat-8.5.75/webapps/axelor/. instead of any of the things that built that WAR file.

Sometimes requests for internet delivered resources fail so read the messages to see if a command fails. Simply try it again if it fails. Some servers are really busy and a CURL, gradlew, or clone command might be denied on a few tries.
cd

  • cd

  • mkdir sources

  • cd sources/

  • git clone https://github.com/axelor/open-suite-webapp.git

  • wget https://github.com/axelor/open-suite-webapp/archive/refs/tags/v6.2.1.zip

  • git clone https://github.com/axelor/axelor-open-suite.git

  • cd open-suite-webapp/

  • git submodule init (somehow this causes an error building the .git/config file that the next 5 bullets fix)

  • cd .git

  • pico config

    • Because the dev's forget to fix this, change the bottom line from
      url = git@github.com:axelor/axelor-open-suite.git
      to
      url = https://github.com/axelor/axelor-open-suite.git

    • Save your changes
      Like stated before, Filemin is an option to make these changes.

  • cd ..

  • git submodule init

  • git submodule update

  • cd src/main/resources

  • nano applicaton.properties

    • In that file you can change many things, but the parts that must be altered are from
      db.default.url = jdbc:postgresql://localhost:5432/axelor-open-suite
      db.default.user = axelor
      db.default.password = *****
      to
      db.default.url = jdbc:postgresql://localhost:5432/the-actual-dtabase-name-you-made
      db.default.user = the-actual-pgsql-username-you-made
      db.default.password = CHANGE-THIS-TO-A-PASSWORD (that one you made for pgsql-user before)

    • Save your changes
      Like stated before, Filemin is an option to make these changes.

  • cd ../../..

  • ./gradlew clean build (I've had times wherer I got errors and needed to run this command multiple times)

  • cd

  • cp ./sources/open-suite-webapp/build/libs/axelor-erp-6.2.1.war ./opt/default-tomcat/webapps/axelor.war

  • ./opt/default-tomcat/bin/startup.sh && tail -f ./opt/default-tomcat/logs/catalina.out
    If you never saw the
    && before, it means to immediately execute the second thing after the first one is successful.

    • You should see a lot of info buzzing up the screen as that WAR file gets lit up by Tomcat. It's gonna take a while. The message you want to see after it's done is com.axelor.web.AppInitializer : Ready to serve...
      use
      Ctrl+C (aka: ^C) to quit the Tail porgram.

  • logout

Docker :: Axelor Documentation

Because your 8080 port may be captured by Apache's proxy, Reboot your server.

Then running the command sudo docker run -it -p 8080:80 axelor/aio-erp should do it.