syslog server設定 (將所有機器的 syslog 集中管理)
打開防火場udp 514 port
syslog server: ( ex : 192.168.0.200 )
#vi /etc/rc.conf
syslogd_flags=”-a 192.168.0.0/24:514″
syslog client:
#vi /etc/syslog.conf
*.* @192.168.0.200
PS: 請自行替換斜體黑字部份。
分享此文章
無聊人網誌
打開防火場udp 514 port
syslog server: ( ex : 192.168.0.200 )
#vi /etc/rc.conf
syslogd_flags=”-a 192.168.0.0/24:514″
syslog client:
#vi /etc/syslog.conf
*.* @192.168.0.200
PS: 請自行替換斜體黑字部份。
分享此文章
Apache will lock the log file and syslog also cannot rotate it.
so we need a program cronolog
1. download most update version from http://cronolog.org/
2. unzip the file
3. ./configure
4. make
5. make install
6. configure the apache
CustomLog “|/usr/sbin/cronolog /var/www/logs/domain.com-access_log.%Y%m%d” common
ErrorLog “|/usr/sbin/cronolog /var/www/logs/domain.com-error_log.%Y%m%d”
7. restart apache
8. Done
分享此文章
[...]