1、下载syslog-ng、eventlog软件包
生产环境:
eventlog-0.2.12
syslog-ng-3.4.8
1.1 git clone
# git clone //下载syslog-ng# git clone https://github.com/balabit/eventlog.git //下载eventlog
1.2 下载tar包
https://my.balabit.com/downloads/eventlog //根据自己需要下载相应eventlog版本 //根据自己需要下载相应syslog-ng版本 //syslog-ng所有软件包下载地址
2、编译安装
2.1 编译安装 eventlog
# cd eventlog# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH //配置编译路径# ./configure --prefix=/usr/local/eventlog# make; make install
2.2 编译安装syslog-ng
# cd syslog-ng# ./configure --prefix=/usr/local/syslog-ng# make; make install
3、启动syslog-ng
# cd /usr/loca/syslog-ng#sbin/syslog-ng //启动syslog-ng
4、查看监听端口
# ss -tlnp | grep syslog-ngLISTEN 0 128 *:51414 *:* users:(("syslog-ng",32639,18))LISTEN 0 128 *:514 *:* users:(("syslog-ng",32639,10))LISTEN 0 128 *:51401 *:* users:(("syslog-ng",32639,12))LISTEN 0 128 *:51402 *:* users:(("syslog-ng",32639,14))LISTEN 0 128 *:51403 *:* users:(("syslog-ng",32639,16))
5、安装遇到的问题:
5.1 启动时提示以下错误信息
Plugin module not found in 'module-path'; module-path='/usr/local/syslog-ng-3.4.8/lib/syslog-ng', module='afsmtp'
解决方法:安装libesmtp-dev
apt-get install libesmtp-dev
5.2 编译时提示以下信息
/usr/bin/ld: cannot find -lssl/usr/bin/ld: cannot find -lcrypto
解决方法:安装libssl-dev
apt-get install libssl-dev