Centos5.5下日志服务器搭建
2013-05-21 22:20
309 查看
实验环境:Centos5.5 64位
服务器ip:192.168.200.2/24
客户端ip:192.168.200.3/24
一:服务端配置
1:更改/etc/sysconfig/syslog
![](http://img1.51cto.com/attachment/201305/221747300.jpg)
增加 -r -x 参数
重启syslog服务
/etc/init.d/syslog restart
2:添加iptables规则
iptables -A INPUT -p udp -i eth0 -s192.168.200.3 -d 192.168.200.2 --sport 514 -j ACCEPT
允许来自客户端514端口的udp数据传到服务器上
二:客户端配置
1:更改/etc/syslog.conf文件
在文件末尾添加一行
![](http://img1.51cto.com/attachment/201305/221854292.jpg)
2:添加iptables规则
允许从客户端的514端口传输udp封包到日志服务器的防火墙策略.
iptables -t filter -A INPUT -p tcp --dport 514 -j ACCEPT
3:重启syslog服务
/etc/init.d/syslog restart
三:验证
在服务器上tail -f /var/log/messages
![](http://img1.51cto.com/attachment/201305/221949408.jpg)
成功!!
本文出自 “成长记录” 博客,请务必保留此出处http://shitao123.blog.51cto.com/3873637/1206313
服务器ip:192.168.200.2/24
客户端ip:192.168.200.3/24
一:服务端配置
1:更改/etc/sysconfig/syslog
![](http://img1.51cto.com/attachment/201305/221747300.jpg)
增加 -r -x 参数
重启syslog服务
/etc/init.d/syslog restart
2:添加iptables规则
iptables -A INPUT -p udp -i eth0 -s192.168.200.3 -d 192.168.200.2 --sport 514 -j ACCEPT
允许来自客户端514端口的udp数据传到服务器上
二:客户端配置
1:更改/etc/syslog.conf文件
在文件末尾添加一行
![](http://img1.51cto.com/attachment/201305/221854292.jpg)
2:添加iptables规则
允许从客户端的514端口传输udp封包到日志服务器的防火墙策略.
iptables -t filter -A INPUT -p tcp --dport 514 -j ACCEPT
3:重启syslog服务
/etc/init.d/syslog restart
三:验证
在服务器上tail -f /var/log/messages
![](http://img1.51cto.com/attachment/201305/221949408.jpg)
成功!!
本文出自 “成长记录” 博客,请务必保留此出处http://shitao123.blog.51cto.com/3873637/1206313
相关文章推荐
- Centos5.5下日志服务器搭建
- CentOS 5.5搭建日志服务器
- Centos下用lamp搭建日志服务器
- centos7下搭建sentry错误日志服务器
- redhat 下svn服务器搭建--CentOS 5.5下搭建部署独立SVN服务器全程详解
- CentOS 5.5下搭建部署独立SVN服务器全程详解
- CentOS 5.5下搭建部署独立SVN服务器全程详解
- centos6.4搭建rsyslog日志服务器和loganalyzer 日志分析工具
- CentOS 中log日志服务器的搭建
- CentOS 5.8搭建日志管理服务器(syslog-ng+logzilla)续:添加syslog-ng自启动脚本
- CentOS 5.5下搭建部署独立SVN服务器全程详解
- centos6.4搭建rsyslog日志服务器和loganalyzer 日志分析工具--续
- centos 搭建日志服务器
- CentOS 5.8搭建日志管理服务器(syslog-ng+logzilla)
- CentOS 5.5下搭建部署独立SVN服务器全程详解
- Centos6.5 搭建 LogAnalyzer4.1.1 - 开源日志服务器(一)
- 第四百零五节,centos7下搭建sentry错误日志服务器,接收python以及Django错误,
- 【转载】CentOS 5.5下搭建部署独立SVN服务器全程详解
- CENTOS下日志服务器的搭建
- Centos搭建日志服务器