готово
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu[admin@MikroTik] /snmp/community> add name=v3user addresses=::/0 authentication-password=UFDz3XGjYUhVEjTS encryption-password=ZwtM5KlwSsVQxsyc authentication-protocol=SHA1 encryption-protocol=AES security=private read-access=yes write-access=no
❯ nxsnmpget -a SHA1 -A UFDz3XGjYUhVEjTS -e AES -E ZwtM5KlwSsVQxsyc -u v3user -v 3 10.40.4.18 1.3.6.1.2.1.1.1.0
1.3.6.1.2.1.1.1.0 [STRING]: RouterOS RB5009UPr+S+
curl -O https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/12.0.17/jetty-home-12.0.17.tar.gz # download latest Jetty12
tar zxf jetty-home-12.0.17.tar.gz -C /opt # unpack it to /opt/
ln -s /opt/jetty-home-12.0.17 /opt/jetty-home-12 # make a symlink without a minor version, so every upgrade you don't have to modify systemd unit
mkdir /opt/netxms-web/ # actual work area for the web
cd /opt/netxms-web/
java -jar /opt/jetty-home-12.0.17/start.jar --add-modules=server,http,ee8-deploy,gzip,http2,https,logging-logback,plus,ssl,work # create default configuration for jetty
vim start.d/ssl.ini # change keyStorePath and keyStorePassword to match your keystrore
curl -o webapps/ROOT.war https://netxms.com/download/releases/5.1/nxmc-5.1.4.war # download war file to webapps/ROOT.war, so app will be available at /
java -jar /opt/jetty-home-12.0.17/start.jar # test that it runs
useradd -r -s /sbin/nologin jetty # create user so we don't run it as root
systemctl edit --full --force netxms-web.service # create service, paste sample from bellow
systemctl enable --now netxms-web.service # enable autostart and start immediately
[Unit]
Description=NetXMS WEB UI
StartLimitIntervalSec=0
[Service]
Type=simple
WorkingDirectory=/opt/netxms-web
User=jetty
Group=jetty
ExecStart=java -jar /opt/jetty-home-12/start.jar
Restart=on-failure
RestartSec=30
TimeoutSec=900
[Install]
WantedBy=multi-user.target