Installation

OS support

os support

RMON supports the following OSes:

  • EL7 (RPM installation and manual installation). It must be "Infrastructure Server" at least. x86_64 only.
  • EL8 (RPM installation and manual installation). It must be "Infrastructure Server" at least. x86_64 only.
  • EL9 (RPM installation and manual installation). It must be "Infrastructure Server" at least. x86_64 only.
  • Amazon Linux 2 (RPM installation and manual installation). x86_64 only.

Installation on:

CentOS/Red Hat Enterprise Linux/Amazon Linux 2/Oracle Linux

notice
Installation information for different operating systems can be found here. To install RMON on CentOS/RedHat Enterprise Linux/Amazon Linux 2/Oracle Linux, follow the steps below.

Install the yum-utils package (which provides the yum-config-manager utility), set up the repository, and install the latest version:

Open the following link in your browser: https://your_ip/.

Use the default credentials: login - admin, password - admin.

notice
Installation information for different operating systems can be found here. To install RMON on CentOS/RedHat Enterprise Linux/Amazon Linux 2/Oracle Linux, follow the steps below.
notice
Do not forget to generate a new SALT. Read how to do this at the end of the article.

Installation on Ubuntu

notice
DEB packages are only available for the following Linux distributions: Ubuntu (Bionic, Focal, Groovy, Hirsute, Impish, Jammy, Kinetic, Lunar, Mantic). Installation information for different operating systems can be found here. Follow the steps below to install RMON on Ubuntu.

Add the RMON repository to your source list:

  1. sudo echo \
  2. "deb [arch=amd64, trusted=yes] https://repo.rmon.io/ubuntu \
  3. $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/rmon.list > /dev/null

Run the following commands:

  1. sudo apt update

Open the following link in your browser: https://your_ip/.

Use the default credentials: login - admin, password - admin.

If you get the "Internal error" after installation, install all requirements via pip3.

notice
Installation information for different operating systems can be found here. To install RMON on CentOS/RedHat Enterprise Linux/Amazon Linux 2/Oracle Linux, follow the steps below.
notice
Do not forget to generate a new SALT. Read how to do this at the end of the article.

After the installation: Configuring RMON

After installing RMON, edit the /etc/rmon/rmon.cfg configuration file. The default configuration is shown below:

  1. [main]
  2. log_path = /var/log/rmon
  3. lib_path = /var/lib/rmon
  4. # Change secret_phrase to 32 url-safe base64-encoded
  5. secret_phrase = _B8avTpFFL19M8P9VyTiX42NyeyUaneV26kyftB2E_4=
  6. [mysql]
  7. # By default Sqlite DB is used
  8. enable = 0
  9. mysql_user = rmon
  10. mysql_password = rmon
  11. mysql_db = rmon
  12. mysql_host = 127.0.0.1
  13. [pgsql]
  14. # By default Sqlite DB is used
  15. enable = 0
  16. user = rmon
  17. password = rmon
  18. db = rmon
  19. host = 127.0.0.1
  20. port = 5432

Database settings

MySQL

The default database used by RMON is SQLite. If you want to use MySQL, make the following changes to the configuration file:

  1. [mysql]
  2. # By default Sqlite DB is used
  3. enable = 0
  4. mysql_user = rmon
  5. mysql_password = rmon
  6. mysql_db = rmon
  7. mysql_host = 127.0.0.1
  8. mysql_port = 3306

After editing the configuration file, create the RMON database on your MySQL server:

  1. MariaDB [(none)]> create user 'rmon'@'%';
  2. MariaDB [(none)]> create database rmon;
  3. MariaDB [(none)]> grant all on rmon.* to 'rmon'@'%' IDENTIFIED BY 'rmon';
  4. MariaDB [(none)]> grant all on rmon.* to 'rmon'@'localhost' IDENTIFIED BY 'rmon';

After creating the database, run the create_db.py script.

notice
If you are going to use RMON to manage multiple servers in production, we recommend using MySQL or PostgreSQL.

PostgreSQL

The default database used by RMON is SQLite. If you want to use PostgreSQL, make the following changes to the configuration file:

  1. [pgsql]
  2. # By default Sqlite DB is used
  3. enable = 0
  4. user = rmon
  5. password = rmon
  6. db = rmon
  7. host = 127.0.0.1
  8. port = 5432

After editing the configuration file, create the RMON database on your MySQL server:

  1. # su - postgres
  2. $ createuser rmon
  3. $ createdb rmon
  4. $ psql
  5. postgres=# alter user rmon with encrypted password 'rmon';
  6. postgres=# grant all privileges on database rmon to rmon;
  7. postgres=# \c rmon
  8. rmon=# GRANT ALL ON SCHEMA public TO rmon;

After creating the database, run the create_db.py script.

notice
If you are going to use RMON to manage multiple servers in production, we recommend using MySQL or PostgreSQL.

Configuring Apache

If you want to use a custom domain name, make changes to the Apache configuration file for RMON:

  1. sudo vi /etc/httpd/conf.d/rmon.conf

If you want to enable redirection from port 80 to port 443, add the following lines to your configuration file:

  1. <VirtualHost *:80>
  2. ServerName my_domain.local
  3. Redirect permanent "/" "https://my_domain.local/"
  4. </VirtualHost>

Find the following lines and replace "rmon.example.com" with your domain name:

  1. <VirtualHost *:443>
  2. ...
  3. ServerName my_domain.local
  4. ...
  5. </VirtualHost>

If you want to use custom certificates, edit the following lines:

  1. <VirtualHost *:443>
  2. ...
  3. SSLEngine on
  4. SSLCertificateFile /var/www/haproxy-wi/app/certs/haproxy-wi.crt
  5. SSLCertificateKeyFile /var/www/haproxy-wi/app/certs/haproxy-wi.key
  6. ...
  7. </VirtualHost>

Generate SALT

RMON encrypts SSH passwords and SSH passphrases. To ensure that no one but you can decrypt your passwords, generate your own salt and put it in the /etc/rmon/rmon.cfg:

  1. from cryptography.fernet import Fernet
  2. key = Fernet.generate_key()
  3. print(key)