分类: 系统运维
2014-01-02 17:45:02
1
|
yum install httpd mysql* php* mod_ssl rsyslog-mysql -y
|
1
2
|
SYSLOGD_OPTIONS="-c 2 -r -x -m 180"
KLOGD_OPTIONS="-x"
|
1
2
3
|
$ModLoad immark.so
$ModLoad imudp.so
$UDPServerRun 514
|
1
|
*.* @192.168.244.132
|
1
|
export PROMPT_COMMAND='{ msg=$(history 1 | { read x y; echo $y; });logger "[euid=$(whoami)]":$(who am i):[`pwd`]"$msg"; }'
|
1
|
[root@logserver ~]# mysql -u root -p < /usr/share/doc/rsyslog-mysql-5.8.10/createDB.sql
|
1
|
mysql> grant all on Syslog.* to log@'%' identified by 'log123';
|
1
2
|
$ModLoad ommysql
*.* :ommysql:192.168.244.132,Syslog,log,log123
|
1
|
mysql> select ID,FromHost,Message from SystemEvents where FromHost like '%client1%';
|
1
2
3
4
5
6
7
8
|
wget
tar zxvf loganalyzer-3.6.3.tar.gz
mkdir -p /var/www/html/syslog
rsync -a loganalyzer-3.6.3/src/* /var/www/html/syslog
# vi /etc/httpd/conf.d/ssl.conf 修改下面两行
DocumentRoot "/var/www/html/syslog/"
ServerName
#/etc/init.d/httpd restart
|
1
|
192.168.244.132 lansgg.com
|