Skip to content

axon-server installation (CentOS / RedHat)

Step 1 - Prerequisites

Elasticsearch stores all of the collected data by axon-server. Let's install Java 8 and Elasticsearch first.

Installing JDK

Elasticsearch supports either OpenJDK or Oracle JDK. Since Oracle has changed the licensing model as of January 2019 we suggest using OpenJDK.

Run the following commands for OpenJDK:

sudo yum install java-1.8.0-openjdk-devel

Run the following commands for Oracle JDK:

wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
sudo rpm -i jdk-8u131-linux-x64.rpm

Installing Elasticsearch

Axonops is compatible with Elasticsearch 6.x or 7.x

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.4.1-x86_64.rpm
sudo rpm --install elasticsearch-7.4.1-x86_64.rpm

Increase the bulk queue size of Elasticsearch by running the following command:

Elastic 7+:

sudo echo 'thread_pool.write.queue_size: 2000' >> /etc/elasticsearch/elasticsearch.yml

Elastic 6.x:

sudo echo 'thread_pool.bulk.queue_size: 2000' >> /etc/elasticsearch/elasticsearch.yml

Set the following index codec by running the following command:

sudo echo 'index.codec: best_compression' >> /etc/elasticsearch/elasticsearch.yml

Elasticsearch uses a mmapfs directory by default to store its indices. The default operating system limits on mmap counts is likely to be too low, which may result in out of memory exceptions.

You can increase the limits by running the following command:

sudo sysctl -w vm.max_map_count=262144

Also, Elasticsearch needs max file descriptors system settings at least to 65536.

echo 'elasticsearch  -  nofile  65536' | sudo tee --append /etc/security/limits.conf > /dev/null

And set LimitNOFILE=65536 in /etc/systemd/system/elasticsearch.services

Start Elasticsearch

sudo systemctl start elasticsearch.service

After a short period of time, you can verify that your Elasticsearch node is running by sending an HTTP request to port 9200 on localhost:

curl -X GET "localhost:9200/"

Step 2 - axon-server installer

curl -1sLf 'https://repo.axonops.com/public/yum/cfg/setup/bash.rpm.sh' | sudo bash
sudo yum install axon-server

Step 3 - axon-server configuration

Make sure elastic_hosts matches your Elasticsearch instances.

  • /etc/axonops/axon-server.yml
host: 0.0.0.0  # axon-server endpoint used by the API and the agents
api_port: 8080 # API port (axon-server <> axon-dash)
agents_port: 1888 # axon-server <> axon-agents
elastic_hosts: 
  - http://localhost:9200 
#  - http://localhost:9201
#elastic_skipVerify: true

axon-dash: # axon-dash configuration
  host: 127.0.0.1
  port: 3000
  https: false

alerting:
  notification_interval: 3h # How long to wait before sending a notification again if it has already
                            # been sent successfully for an alert. (Usually ~3h or more).

retention:
  events: 4w # Must be expressed in weeks (w)
  security_events: 8w # Must be expressed in weeks (w)
  metrics:
      high_resolution: 30d # Must be expressed in days (d)
      med_resolution: 24w # Must be expressed in weeks (w)
      low_resolution: 24M # Must be expressed in months (M)
      super_low_resolution: 3y # Must be expressed in years (y)
  backups: # Those are use as defaults but can be overridden from the UI
    local: 10d
    remote: 30d 

# tls:
#   mode: "disabled" # disabled, TLS, mTLS
#   skipVerify: false  
#   caFile: "***.crt"
#   certFile: "***.crt"
#   keyFile: "***.key"

# auth:
#   enabled: false
#   type: "LDAP" # only LDAP is supported for now
#   settings:
#     host: "..."
#     port: 636
#     base: "..."
#     useSSL: true
#     startTLS: true
#     insecureSkipVerify: false
#     bindDN: "..."
#     bindPassword: "..."
#     userFilter: "(cn=%s)"
#     rolesAttribute: "memberOf" # attribute that will contains a user role
#     callAttempts: 3 # how much retries in case of network issues
#     rolesMapping:
#       _global_: # _global_ overrides all other roles (underscores to prevent confusion with an organisationName named 'global')
#         superUserRole: "cn=superuser" # can do everything
#         readOnlyRole: "cn=readonly" # can view everything but can not make any changes
#         adminRole: "cn=admin" # can do everything but not admin users or backups
#         backupAdminRole: "cn=backupadmin" # can view everything and can admin backups
#       # organisationName/clusterType/cluster
#       organisationName: # org permissions 
#         superUserRole: "cn=xxxx"
#         readOnlyRole: "cn=xxxx"
#         adminRole: "cn=xxxx"
#         backupAdminRole: "cn=xxxx"
#       organisationName/cassandra: # cluster type permissions 
#         superUserRole: "cn=xxxx"
#         readOnlyRole: "cn=xxxx"
#         adminRole: "cn=xxxx"
#         backupAdminRole: "cn=xxxx"
#       organisationName/cassandra/prod:  # cluster permissions 
#         superUserRole: "cn=xxxx"
#         readOnlyRole: "cn=xxxx"
#         adminRole: "cn=xxxx"
#         backupAdminRole: "cn=xxxx"

Step 4 - Start the server

sudo systemctl daemon-reload
sudo systemctl start axon-server
sudo systemctl status axon-server

This will start the axon-server process as the axonops user, which was created during the package installation. The default listening address is 0.0.0.0:8080.

Package details

  • Configuration: /etc/axonops/axon-server.yml
  • Binary: /usr/share/axonops/axon-server
  • Logs: /var/log/axonops/axon-server.log
  • Systemd service: /usr/lib/systemd/system/axon-server.service
  • Copyright : /usr/share/doc/axonops/axon-server/copyright
  • Licenses : /usr/share/axonops/licenses/axon-server/

Step 5 - Installing axon-dash

Now axon-server is installed, you can start installing the GUI for it: axon-dash