Linux 监控/SNMP配置
Linux系统的SNMP服务设置
1) 安装SNMP
略,请参阅LINUX系统SNMP安装说明,一般情况下Linux中的均已经自动安装了SNMP服务。以下命令可以检测SNMP服务是否安装以及安装的文件包。
[root@idc ~]# rpm -qa |grep snmp
net-snmp-libs-5.1.2-11.EL4.7
net-snmp-5.1.2-11.EL4.7
2) 配置SNMP
按照如下方式修改/etc/snmp/snmpd.conf文件
A、修改默认的community string(SUM中SNMP读值密码)
com2sec notConfigUser default public
将public修改为你才知道的字符串
将“default”改为你想哪台机器可以看到你的snmp信息,比如SUM所在IP为:10.10.10.10,就改成这个IP。不改表示所有机器充许。
B、把下面的#号去掉
#view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
启用全部功能可以使用如下一行(如果没有可以加入一行):
view all included .1 80
C、把下面的语句
access notConfigGroup "" any noauth exact systemview none none
改成:
access notConfigGroup "" any noauth exact mib2 none none
或是:
access notConfigGroup "" any noauth exact all none none
3) 启动与停止SNMP
一般使用:service snmpd start|stop|restart命令。或是:
#/etc/rc.d/init.d/snmpd restart
4) 防火墙
如果Linux启动了防火墙,请开放UDP的161端口。确保Linux的iptables防火墙对SUM监控服务器开放了udp 161端口的访问权限
可使用iptables ?L ?n 查看当前iptables规则
可编辑/etc/sysconfig/iptables文件来修改iptables规则。
------哲涛科技技术研发中心
相关文档:
前言:
我们在这一节将要讨论linux下文件操作的各个函数.
1.文件的创建和读写
2.文件的各个属性
3.目录文件的操作
4.管道文件
--------------------------------------------------------------------------------
1。文件的创建和读写
......
引用:http://blog.chinaunix.net/u/12207/showart_2061214.html
关于2.6.31遇到的问题
错误提示1:
drivers/built-in.o(.init.text+0x3bad): In function `con_init':
include/trace/events/kmem.h:47: undefined reference to `.L1452'
解决:
vi /usr/src/linux/drivers/char/vt.c 找到static int __init con_init ......
切换到root用户下,
service iptables status 用于查看是否有开启防方墙.
service iptables stop 用于关闭防火墙.
service iptables start 用于打开防火墙.
防火墙的开启有时会限制外部访问服务器上的端口失败. ......
linux 常用命令总结:
一。 通用命令:
1. date :print or set the system date and time
2. stty -a: 可以查看或者打印控制字符(Ctrl-C, Ctrl-D, Ctrl-Z等)
3. passwd: print or set the system date and time (用passwd -h查看)
4. logout, login: 登录shell的登录和注销命令
5. pwd: print or set the system ......