1、安装 eventlog
tar -zxvf eventlog-0.2.13.tar.gz
cd eventlog-0.2.13
./configure --prefix=/usr/local/eventlog-0.2.13
make && make install
ln -s /usr/local/eventlog-0.2.13 /usr/local/eventlog
2、设置临时环境变量
yum install libesmtp libesmtp-devel
yum install libgnomeui-devel
yum install pcre pcre-devel
yum install json-c json-c-devel
export PKG_CONFIG_PATH=/usr/local/eventlog/lib/pkgconfig/
3、安装syslog-ng
tar -zxvf syslog-ng-3.8.1.tar.gz
cd syslog-ng-3.8.1
./configure --prefix=/usr/local/syslog-ng-3.8.1 --enable-ssl --enable-smtp --enable-pcre --enable-json
make && make install
ln -s /usr/local/syslog-ng-3.8.1 /usr/local/syslog-ng
出现的问题
缺少 libjvm.so module.
解决方式:
修改 ldconfig,具体:
cd /etc/ld.so.conf.d/
ln -s /home/server_config/ld.so.conf.d/libjvm.conf libjvm.conf
ldconfig
/home/server_config/ld.so.conf.d/libjvm.conf 文件内容:
/usr/lib/jvm/jre/lib/amd64/server/
如果不成功,查看是否有下面的文件。
cd /usr/lib/jvm
ln -s /usr/local/jdk1.7.0_51/jre jre
启动 syslog-ng正常
service syslog-ng restart