Clean Linux OS
groupadd xormon useradd -m -g xormon xormon passwd xormon
vi /etc/security/limits.confAppend following lines before the end of the 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
suseconnect -p sle-module-basesystem/15.6/x86_64 suseconnect -p sle-module-desktop-applications/15.6/x86_64 suseconnect -p sle-module-development-tools/15.6/x86_64 suseconnect -p sle-module-server-applications/15.6/x86_64 suseconnect -p sle-module-web-scripting/15.6/x86_64 suseconnect -p sle-module-python3/15.6/x86_64 suseconnect -p sle-module-systems-management/15.6/x86_64 suseconnect -p PackageHub/15.6/x86_64Check activated repositories
zypper repos # | Alias | Name | Enabled | GPG Check | Refresh ---+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------+---------+-----------+-------- 3 | Basesystem_Module_15_SP6_x86_64:SLE-Module-Basesystem15-SP6-Pool | SLE-Module-Basesystem15-SP6-Pool | Yes | (r ) Yes | No 5 | Basesystem_Module_15_SP6_x86_64:SLE-Module-Basesystem15-SP6-Updates | SLE-Module-Basesystem15-SP6-Updates | Yes | (r ) Yes | Yes 8 | Desktop_Applications_Module_15_SP6_x86_64:SLE-Module-Desktop-Applications15-SP6-Pool | SLE-Module-Desktop-Applications15-SP6-Pool | Yes | (r ) Yes | No 10 | Desktop_Applications_Module_15_SP6_x86_64:SLE-Module-Desktop-Applications15-SP6-Updates | SLE-Module-Desktop-Applications15-SP6-Updates | Yes | (r ) Yes | Yes 13 | Development_Tools_Module_15_SP6_x86_64:SLE-Module-DevTools15-SP6-Pool | SLE-Module-DevTools15-SP6-Pool | Yes | (r ) Yes | No 15 | Development_Tools_Module_15_SP6_x86_64:SLE-Module-DevTools15-SP6-Updates | SLE-Module-DevTools15-SP6-Updates | Yes | (r ) Yes | Yes 18 | Python_3_Module_15_SP6_x86_64:SLE-Module-Python3-15-SP6-Pool | SLE-Module-Python3-15-SP6-Pool | Yes | (r ) Yes | No 20 | Python_3_Module_15_SP6_x86_64:SLE-Module-Python3-15-SP6-Updates | SLE-Module-Python3-15-SP6-Updates | Yes | (r ) Yes | Yes 24 | SUSE_Linux_Enterprise_Server_15_SP6_x86_64:SLE-Product-SLES15-SP6-Pool | SLE-Product-SLES15-SP6-Pool | Yes | (r ) Yes | No 26 | SUSE_Linux_Enterprise_Server_15_SP6_x86_64:SLE-Product-SLES15-SP6-Updates | SLE-Product-SLES15-SP6-Updates | Yes | (r ) Yes | Yes 29 | SUSE_Package_Hub_15_SP6_x86_64:SLE-Module-Packagehub-Subpackages15-SP6-Pool | SLE-Module-Packagehub-Subpackages15-SP6-Pool | Yes | (r ) Yes | No 31 | SUSE_Package_Hub_15_SP6_x86_64:SLE-Module-Packagehub-Subpackages15-SP6-Updates | SLE-Module-Packagehub-Subpackages15-SP6-Updates | Yes | (r ) Yes | Yes 33 | SUSE_Package_Hub_15_SP6_x86_64:SUSE-PackageHub-15-SP6-Backports-Pool | SUSE-PackageHub-15-SP6-Backports-Pool | Yes | (r ) Yes | No 34 | SUSE_Package_Hub_15_SP6_x86_64:SUSE-PackageHub-15-SP6-Pool | SUSE-PackageHub-15-SP6-Pool | Yes | (r ) Yes | No 37 | Server_Applications_Module_15_SP6_x86_64:SLE-Module-Server-Applications15-SP6-Pool | SLE-Module-Server-Applications15-SP6-Pool | Yes | (r ) Yes | No 39 | Server_Applications_Module_15_SP6_x86_64:SLE-Module-Server-Applications15-SP6-Updates | SLE-Module-Server-Applications15-SP6-Updates | Yes | (r ) Yes | Yes 42 | Systems_Management_Module_15_SP6_x86_64:SLE-Module-Systems-Management-15-SP6-Pool | SLE-Module-Systems-Management-15-SP6-Pool | Yes | (r ) Yes | No 44 | Systems_Management_Module_15_SP6_x86_64:SLE-Module-Systems-Management-15-SP6-Updates | SLE-Module-Systems-Management-15-SP6-Updates | Yes | (r ) Yes | Yes 47 | Web_and_Scripting_Module_15_SP6_x86_64:SLE-Module-Web-Scripting15-SP6-Pool | SLE-Module-Web-Scripting15-SP6-Pool | Yes | (r ) Yes | No 49 | Web_and_Scripting_Module_15_SP6_x86_64:SLE-Module-Web-Scripting15-SP6-Updates | SLE-Module-Web-Scripting15-SP6-Updates | Yes | (r ) Yes | Yes
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 vim sudo perl ed libxml2-2 wget curl gpg2 sblim-wbemcli libaio1 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 \ perl-DBD-Pg 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
sed -i 's/^\(host \+all \+all \+127.0.0.1\/32 \+\)ident/\1scram-sha-256/g' /var/lib/pgsql/data/pg_hba.confEdit configuration manually
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-256
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.24.0 ./bootstrap cd build && make make install
sed -i "s/^#shared_preload_libraries =.*/shared_preload_libraries = 'timescaledb'/g" /var/lib/pgsql/data/postgresql.confEdit configuration manually
vi /var/lib/pgsql/data/postgresql.conf # replace #shared_preload_libraries = '' # with shared_preload_libraries = 'timescaledb'
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 "Note: netstat is gradually being phased out in some Linux distributions.
ss -ltn | grep -w 443
su - setcap 'cap_net_bind_service=+ep' `which node`Some Linux distributions set command alternatives for multiple verions.
update-alternatives --get-selections | grep node node-default auto /usr/bin/node20
setcap 'cap_net_bind_service=+ep' /usr/bin/node setcap 'cap_net_bind_service=+ep' /usr/bin/node20
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.
ls -ls /usr/bin/python*Example:
lrwxrwxrwx 1 root root 9 Aug 4 13:28 /usr/bin/python3 -> python3.6 -rwxr-xr-x 1 root root 6288 Nov 24 15:30 /usr/bin/python3.12 -rwxr-xr-x 1 root root 3378 Nov 24 15:30 /usr/bin/python3.12-config -rwxr-xr-x 2 root root 10560 Aug 4 13:28 /usr/bin/python3.6 lrwxrwxrwx 1 root root 17 Aug 4 13:28 /usr/bin/python3.6-config -> python3.6m-config -rwxr-xr-x 2 root root 10560 Aug 4 13:28 /usr/bin/python3.6m -rwxr-xr-x 1 root root 3440 Aug 4 13:28 /usr/bin/python3.6m-config lrwxrwxrwx 1 root root 16 Aug 4 13:28 /usr/bin/python3-config -> python3.6-configpython3.12 is available in the above example.
cd ~/xormon-ng/server-nest/ python3.12 -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