Installation
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
Install the yum-utils package (which provides the yum-config-manager utility), set up the repository, and install the latest version:
- sudo yum install -y yum-utils epel-release
- sudo yum-config-manager --add-repo https://repo.rmon.io/rmon.repo
- sudo yum install rmon rmon-server rmon-socket
Open the following link in your browser: https://your_ip/.
Use the default credentials: login - admin, password - admin.
Installation on Ubuntu
Add the RMON repository to your source list:
- sudo echo \
- "deb [arch=amd64, trusted=yes] https://repo.rmon.io/ubuntu \
- $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/rmon.list > /dev/null
Run the following commands:
- sudo apt update
- sudo apt install rmon
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.
After the installation: Configuring RMON
After installing RMON, edit the /etc/rmon/rmon.cfg configuration file. The default configuration is shown below:
- [main]
- log_path = /var/log/rmon
- lib_path = /var/lib/rmon
- # Change secret_phrase to 32 url-safe base64-encoded
- secret_phrase = _B8avTpFFL19M8P9VyTiX42NyeyUaneV26kyftB2E_4=
- [mysql]
- # By default Sqlite DB is used
- enable = 0
- mysql_user = rmon
- mysql_password = rmon
- mysql_db = rmon
- mysql_host = 127.0.0.1
- [pgsql]
- # By default Sqlite DB is used
- enable = 0
- user = rmon
- password = rmon
- db = rmon
- host = 127.0.0.1
- 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:
- [mysql]
- # By default Sqlite DB is used
- enable = 0
- mysql_user = rmon
- mysql_password = rmon
- mysql_db = rmon
- mysql_host = 127.0.0.1
- mysql_port = 3306
After editing the configuration file, create the RMON database on your MySQL server:
- MariaDB [(none)]> create user 'rmon'@'%';
- MariaDB [(none)]> create database rmon;
- MariaDB [(none)]> grant all on rmon.* to 'rmon'@'%' IDENTIFIED BY 'rmon';
- MariaDB [(none)]> grant all on rmon.* to 'rmon'@'localhost' IDENTIFIED BY 'rmon';
After creating the database, run the create_db.py script.
PostgreSQL
The default database used by RMON is SQLite. If you want to use PostgreSQL, make the following changes to the configuration file:
- [pgsql]
- # By default Sqlite DB is used
- enable = 0
- user = rmon
- password = rmon
- db = rmon
- host = 127.0.0.1
- port = 5432
After editing the configuration file, create the RMON database on your MySQL server:
- # su - postgres
- $ createuser rmon
- $ createdb rmon
- $ psql
- postgres=# alter user rmon with encrypted password 'rmon';
- postgres=# grant all privileges on database rmon to rmon;
- postgres=# \c rmon
- rmon=# GRANT ALL ON SCHEMA public TO rmon;
After creating the database, run the create_db.py script.
After this, run the python3 migrate.py init command to create the migrations table in the database, then run the migration with the python3 migrate.py migrate command.
Configuring Apache
If you want to use a custom domain name, make changes to the Apache configuration file for RMON:
- 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:
- <VirtualHost *:80>
- ServerName my_domain.local
- Redirect permanent "/" "https://my_domain.local/"
- </VirtualHost>
Find the following lines and replace "rmon.example.com" with your domain name:
- <VirtualHost *:443>
- ...
- ServerName my_domain.local
- ...
- </VirtualHost>
If you want to use custom certificates, edit the following lines:
- <VirtualHost *:443>
- ...
- SSLEngine on
- SSLCertificateFile /var/www/haproxy-wi/app/certs/haproxy-wi.crt
- SSLCertificateKeyFile /var/www/haproxy-wi/app/certs/haproxy-wi.key
- ...
- </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:
- from cryptography.fernet import Fernet
- key = Fernet.generate_key()
- print(key)