# vim /etc/sysconfig/iptables //** 添加如下内容 **// -A INPUT -m state --state NEW -m tcp -p tcp --dport 514 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
重启防火墙
1
# services iptables restart
关闭 selinux
1
# sed -i 's/enforcing/disabled/' /etc/selinux/config
安装 lamp
1
# yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml mysql mysql-server wget gcc c++ -y
添加开机自启动项
1 2 3
# chkconfig httpd on # chkconfig mysqld on # chkconfig rsyslog on
mysql -u root -p < /usr/share/doc/rsyslog-mysql-5.8.10/createDB.sql
进入数据库,查看是否有 Syslog 数据库
1 2 3 4 5 6 7 8 9 10 11
# mysql -uroot -p mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | Syslog | | mysql | | test | +--------------------+ 4 rows inset (0.00 sec)
Mysql数据库建立一个用户,并制授权用户给上面导入时建立的库Syslog所有权限
1 2 3
mysql> grant all privileges on Syslog.* to 'rsyslog'@'localhost' identified by 'syslogps'; mysql> grant all privileges on Syslog.* to 'rsyslog'@'127.0.0.1' identified by 'syslogps'; mysql> flush privileges;