[root@192 /]# cd /data/moloch/bin/ [root@192 bin]# ./Configure Found interfaces: ens33;lo;virbr0 Semicolon ';' seperated list of interfaces to monitor [eth1] ens33 #输入你自己对应的网卡 Install Elasticsearch server locally for demo, must have at least 3G of memory, NOT recommended for production use (yes or no) [no] no #输入no即可 Elasticsearch server URL [http://localhost:9200] http://127.0.0.1:9200 #elasticsearch服务器地址 一般默认本机或者你指定的地址 必须以http://开头 Password to encrypt S2S and other things [no-default] root #默认的登陆密码,可自行设置 Moloch - Creating configuration files Installing systemd start files, use systemctl Moloch - Installing /etc/logrotate.d/moloch to rotate files after 7 days Moloch - Installing /etc/security/limits.d/99-moloch.conf to make core and memlo ck unlimited Download GEO files? (yes or no) [yes] yes#下载一些文件。直接“yes”即可
# es使用moloch自带的脚本来控制删除 [root@moloch db]# vim daily.sh #!/bin/sh # This script is only needed for Moloch deployments that monitor live traffic. # It drops the old index and optimizes yesterdays index. # It should be run once a day during non peak time. # CONFIG ESHOSTPORT=10.100.10.7:9200 RETAINNUMDAYS=1 /data/moloch/db/db.pl $ESHOSTPORT expire daily $RETAINNUMDAYS
# Set ring buf size, see max with ethool -g eth0 ethtool -G eth0 rx 4096 tx 4096 # Turn off feature, see available features with ethtool -k eth0 ethtool -K eth0 rx off tx off gs off tso off gso off
4.High Performance Settings 高性能设置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# MOST IMPORTANT, use basic magicMode, libfile kills performance magicMode=basic
# 官方称pfring效果更好 # pfring/snf might be better pcapReadMethod=tpacketv3
# Increase by 1 if still getting Input Drops tpacketv3NumThreads=2