終於想起為何一定要更新版本了。原因是舊版的無法幫你依來源IP分檔。
更新一下apt source
apt-get update
//apt-get install libestr-dev //版本太舊,要自己手動裝新版的(要0.1.9以上)
wget http://libestr.adiscon.com/files/download/libestr-0.1.9.tar.gz
tar xvzf libestr-0.1.9.tar.gz
cd libestr-0.1.9
./configure
make && make install
apt-get install libjson0-dev
apt-get install python-docutils
liblogging找不到有人包好的,所以自己弄。
我們要的是裡面的libstdlog.h和libstdlog.so
wget http://ftp5.gwdg.de/pub/linux/archlinux/community/os/x86_64/liblogging-1.0.0pre-1-x86_64.pkg.tar.xz
tar xvf liblogging-1.0.0pre-1-x86_64.pkg.tar.xz
cd /usr/src/usr/lib/
mv * /usr/lib
cd ../include/
mv * /usr/include/
apt-get install uuid-dev
apt-get install libgcrypt11-dev
apt-get install libmysqld-dev
wget http://www.rsyslog.com/files/download/rsyslog/rsyslog-7.4.9.tar.gz
tar xvzf rsyslog-7.4.9.tar.gz
cd rsyslog-7.4.9
./configure --prefix=/opt/rsyslog --enable-mysql PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ \
LIBLOGSTD_CFLAGS=/usr/local/include/liblogging LIBLOGSTD_LIBS=/usr/lib/libstdlog.so
make && make install
cd /opt/rsyslog/lib/rsyslog
cp * /lib
cp * /lib64/
cd /usr/sbin/
mv rsyslogd rsyslogd.old
cd /opt/rsyslog/sbin/
mv rsyslogd /usr/sbin/
service rsyslog stop
service rsyslog start
沒有留言:
張貼留言