#vim /etc/snmp/snmpd.conf
在snmpd.conf文件末尾添加
proxy -v 2c -c public 192.168.x.x:1161 .1.3.6.1.4.1.42
# cd $JAVA_HOME/jre/lib/management
#vim management.properties
找到#com.sun.management.snmp.port=<port-number>
改成com.sun.management.snmp.port=1161
找到#com.sun.management.snmp.interface=0.0.0.0
改成com.sun.management.snmp.interface=192.168.x.x
#cp snmp.acl.template snmp.acl
#vim snmp.acl -----配置JVM其允许通过snmp访问权限
找到
# acl = {
# {
# communities = public, private
# access = read-only
# managers = localhost
# }
# }
#
#
# trap = {
# {
# trap-community = public
# hosts = localhost
# }
# }
去掉所有的#,localhost改为本机IP
#chmod 600 management.properties snmp.acl
# vim /usr/local/resin/conf/resin.xml
在<thread-max>10240</thread-max>下面对其添加:
<jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg>
<jvm-arg>-Dcom.sun.management.jmxremote.port=51517</jvm-arg>
<jvm-arg>-Dcom.sun.management.jmxremote.ssl=false</jvm-arg>
<jvm-arg>-Dcom.sun.management.jmxremote.authenticate=false</jvm-arg>
<jvm-arg>-Dcom.sun.management.snmp.port=1161</jvm-arg>
#service snmpd restart
#/usr/local/resin/bin/resin.sh stop -server youyuan
# /usr/local/resin/bin/resin.sh start -server youyuan