1. 程式人生 > >編譯安裝syslog-ng   debian

編譯安裝syslog-ng   debian

syslog

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-ng
LISTEN     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


本文出自 “馬行空” 博客,轉載請與作者聯系!

編譯安裝syslog-ng debian