netams4
Это старая версия документа!
Netams4 centos7
netams4.0.1640-linux-x64.tar.gz
не забываем в файл hosts прописать имя и ip сервера иначе не запустится ява
<pre> wget https://wiki.augin.ru/lib/exe/fetch.php?media=netams4.0.1640-linux-x64.tar.gz mkdir /opt/netams4 cp netams4.0.1640-linux-x64.tar.gz /opt/netams4/netams4.0.1640-linux-x64.tar.gz cd /opt/netams4 tar -zxvf netams4.0.1640-linux-x64.tar.gz yum install epel-release yum install java yum install mariadb-server systemctl enable mariadb systemctl start mariadb mysql_secure_installation mysql -u root -p mysql> Enter password: ***** mysql> CREATE DATABASE netams4; mysql> GRANT ALL PRIVILEGES ON netams4.* TO 'netams'@'localhost' IDENTIFIED BY 'password'; mysql> quit /opt/netams4/netams4.properties db.sql.mysql.user=netams db.sql.mysql.password=password cd /opt/netams4 ln -s /usr/lib/jvm/jre java cd /opt/netams4/jserver ln -s /usr/lib/jvm/jre java yum install flex bison gcc gcc-c++ wget http://www.tcpdump.org/release/libpcap-1.8.1.tar.gz tar -zxvf libpcap-1.8.1.tar.gz cd libpcap-1.8.1 ./configure make make install cd /opt/netams4/lib/so-dll/linux-x64/ ln -s /usr/local/lib/libpcap.so.1.8.1 libpcap.so.1 ln -s /usr/local/lib/libpcap.so.1.8.1 libpcap.so.0.8 </pre>
nano /etc/systemd/system/netams.service
<pre> [Unit] Description=netams After=network.target After=mysqld.service [Service] Type=oneshot Restart=no #RestartSec=1 KillMode=process User=root WorkingDirectory=/opt/netams4 ExecStart=/opt/netams4/startup.sh RemainAfterExit=yes ExecStop=killall java [Install] WantedBy=multi-user.target </pre> <pre> systemctl daemon-reload systemctl start netams.service systemctl enable netams.service </pre>
<pre> cp /opt/netams4/jserver/agent/n4agent-linux.sh /etc/init.d/n4agent chkconfig n4agent on nano n4agent DAEMON="/opt/netams4/jserver/agent/$NAME"_pcap SCRIPTNAME=/etc/init.d/$NAME PARAMS="-e /opt/netams4/jserver/agent/access-ipset.sh -c 127.0.0.1:20002 -d" #. /lib/lsb/init-functions </pre>
Разработчики Netams4 категорически не советуют использовать источник данных «JPcapLocalDataSource». Поэтому мы добавим источник данных «RemoteAgentDatasource».
* чистка базы <pre> mysql -uroot -p use netams4; delete from `utilization` where `period` < '2019-11-01'; OPTIMIZE TABLE utilization; delete from `monitor` where `ts` < '2019-11-01'; OPTIMIZE TABLE monitor;
</pre>
netams4.1713290663.txt.gz · Последнее изменение: 08.07.2024 11:48 (внешнее изменение)