标签:XML star 1.3 配置 配置文件 hosts com 修改 服务
修改snmp配置文件vim /etc/snmp/snmpd.conf
在snmpd.conf文件末尾添加
proxy -v 2c -c public 127.0.0.1:1161 .1.3.6.1.4.1.42
修改jdk配置
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=127.0.0.1
复制snmp.acl文件
cp snmp.acl.template snmp.acl
配置JVM其允许通过snmp访问权限
vim snmp.acl
找到
# acl = {
# {
# communities = public, private
# access = read-only
# managers = localhost
# }
# }
#
#
# trap = {
# {
# trap-community = public
# hosts = localhost
# }
# }
去掉所有的# , localhost改为本机IP 127.0.0.1
修改权限
chmod 600 management.properties snmp.acl
修改resin.xml
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 {server}
/usr/local/resin/bin/resin.sh start -server {server}
标签:XML star 1.3 配置 配置文件 hosts com 修改 服务
原文地址:http://blog.51cto.com/chaichuan/2155637