Clean Linux OS
groupadd xormon useradd -m -g xormon xormon passwd xormonIncrease user system limits, append this into /etc/security/limits.conf file
xormon hard stack -1 xormon soft stack -1 xormon hard data -1 xormon soft data -1 xormon hard nofile 32768 xormon soft nofile 32768 xormon hard nproc 64000 xormon soft nproc 64000
zypper repos # | Alias | Name | Enabled | GPG Check | Refresh ---+-----------------------------+---------------------------------------------------------------------------------------------+---------+-----------+-------- 1 | openSUSE-Leap-15.6-1 | openSUSE-Leap-15.6-1 | Yes | (r ) Yes | Yes ... 12 | repo-sle-update | Update repository with updates from SUSE Linux Enterprise 15 | Yes | (r ) Yes | Yes ...
zypper install perl ed libxml2-2 wget curl gpg2 net-tools sblim-wbemcli libaio1 wget curl strace \ perl-TimeDate perl-XML-Simple perl-XML-SAX perl-XML-LibXML perl-CGI \ perl-LWP-Protocol-https perl-libwww-perl perl-IO-Tty openldap2-client \ perl-JSON perl-JSON-XS perl-Net-SNMP net-snmp perl-DBI perl-DBD-ODBC unixODBC unixODBC-devel freetds-config \ perl-DBD-Pg net-tools-deprecated libcap-progs \ python3-virtualenv python3-pip python3-devel gcc-c++ gcc
zypper install nodejs20
zypper install postgresql16 postgresql16-contrib postgresql16-server postgresql16-server-devel postgresql16-devel
systemctl enable --now postgresql.service
vi /var/lib/pgsql/data/pg_hba.conf # replace host all all 127.0.0.1/32 ident # with host all all 127.0.0.1/32 scram-sha-256Single command:
sed -i 's/^\(host \+all \+all \+127.0.0.1\/32 \+\)ident/\1scram-sha-256/g' /var/lib/pgsql/data/pg_hba.conf
sudo -u postgres psql postgres=# \password postgres postgres=# ALTER USER postgres VALID UNTIL 'infinity'; postgres=# \q
zypper install git cmake
cd ~; git clone https://github.com/timescale/timescaledb
cd ~/timescaledb git checkout 2.22.0 ./bootstrap cd build && make make install
vi /var/lib/pgsql/data/postgresql.conf # Replace #shared_preload_libraries = '' # with shared_preload_libraries = 'timescaledb'Single command:
sed -i "s/^#shared_preload_libraries =.*/shared_preload_libraries = 'timescaledb'/g" /var/lib/pgsql/data/postgresql.conf
zypper install go go install github.com/timescale/timescaledb-tune/cmd/timescaledb-tune@latest /root/go/bin/timescaledb-tune -yes -conf-path /var/lib/pgsql/data/postgresql.conf sed -i 's/#synchronous_commit = on/synchronous_commit = off/' /var/lib/pgsql/data/postgresql.conf sed -i 's/#password_encryption/password_encryption/' /var/lib/pgsql/data/postgresql.conf sed -ie 's/32\s ident/32 scram-sha-256/' /var/lib/pgsql/data/pg_hba.conf
systemctl restart postgresql.service
firewall-cmd --zone=public --add-port=8443/tcp --permanent firewall-cmd --zone=public --add-port=8162/tcp --permanent firewall-cmd --reload firewall-cmd --list-port
su - xormon mkdir xormon-ng cd xormon-ng
tar zxf xormon-ng-<ver>.tar.gz ./xormon.sh startIgnore message "PM2 fail to start" at the end of the start procedure if apears.
APP_PORT[8443]= DB_HOST[127.0.0.1]= DB_PORT[5432]= DB_USERNAME[postgres]= DB_DATABASE[xormon]= DB_PASSWORD[]= <password>
netstat -an| grep LISTEN |grep ":443 "
su - setcap 'cap_net_bind_service=+ep' `which node`
vi ~/xormon-ng/server-nest/.env APP_PORT=443
cd ~/xormon-ng ./xormon.sh stop ./xormon.sh start ./xormon.sh statusIgnore message "PM2 fail to start" at the end of the start procedure if apears.
cd ~/xormon-ng/server-nest/ python3 -m venv venv venv/bin/python3 -m ensurepip --upgrade venv/bin/python3 -m pip install --upgrade pip venv/bin/python3 -m pip install -r microservices/analyzer/requirements/requirements.txtIf you get this error:
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 101] Network is unreachable')': /simple/pip/
Then try to avoid it by using internal proxy for Python packages installation
venv/bin/python3 -m pip install --proxy http://<username>:<password>@<hostname>:<port> --upgrade pip venv/bin/python3 -m pip install --proxy http://<username>:<password>@<hostname>:<port> -r microservices/analyzer/requirements/requirements.txt
cd ~/xormon-ng ./xormon.sh stop ./xormon.sh startIgnore message "PM2 fail to start" at the end of the start procedure if apears.
env PATH=$PATH:/usr/bin /home/xormon/xormon-ng/server-nest/node_modules/pm2/bin/pm2 startup systemd -u xormon --hp /home/xormon
https://<IP>:8443/Default login: xormon / xormon