在/home下新建setup.sh
---------------------------------------------------------------------------------------------------------------------------------
cd /usr/local/net-snmp/sbin
./snmptrapd -d -f -Lo -c /usr/local/net-snmp/share/snmp/snmptrapd.conf &
sleep 5
cd /usr/local/net-snmp/sbin
./snmpd -f -Le &
---------------------------------------------------------------------------------------------------------------------------------
在/etc/rc.local添加以下
---------------------------------------------------------------------------------------------------------------------------------
/home/setup.sh
---------------------------------------------------------------------------------------------------------------------------------
开机启动完成。