安装snmp和启用python模块
[root@test ~]# wget http://nchc.dl.sourceforge.net/project/net-snmp/net-snmp/5.7.3/net-snmp-5.7.3.tar.gz
[root@test ~]# tar xf net-snmp-5.7.3.tar.gz
[root@test ~]# cd net-snmp-5.7.3
[root@test ~]# ./configure --prefix=/usr/local/net-snmp --with-python-modules --with-persistent-directory=/usr/local/net-snmp
[root@test ~]# make
[root@test ~]# make install
[root@test ~]# echo '/usr/local/net-snmp/lib/' >> /etc/ld.so.conf.d/server.conf
[root@test ~]# ldconfig
[root@test ~]# echo 'export PATH=/usr/local/net-snmp/sbin/:${PATH}' >> /etc/profile
[root@test ~]# echo 'export PATH=/usr/local/net-snmp/bin/:${PATH}' >> /etc/profile
[root@test ~]# source /etc/profile
[root@test ~]# cd python
[root@test