> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lwops.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 2.1.4. Resin配置

#### 2.1.4.1. windows系统

1、路径： C:\Users\lewei\Desktop\resin-4.0.66\conf\resin.xml ,修改resin-4.0.66\conf目录下的resin.xml 。（路径以实际情况为准） 在 下添加一下内容

-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12340 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=172.0.0.1

![2.1.4. Resin配置 操作截图 1](https://lwweb.oss-cn-shenzhen.aliyuncs.com/docs/images/yuque/resin/image-01.png)

2、重启服务，查看JMX端口

![2.1.4. Resin配置 操作截图 2](https://lwweb.oss-cn-shenzhen.aliyuncs.com/docs/images/yuque/resin/image-02.png)

#### 2.1.4.2. linux系统

1、路径：/usr/local/resin4/bin/resin.sh ,修改resin/bin目录下的resin.sh 。（路径以实际情况为准）

```text theme={null}
# vim resin.sh                      #以下代码添加到最后一行 。
ENV=" -Dcom.sun.management.jmxremote  -Djava.rmi.server.hostname=172.0.0.1  -Dcom.sun.management.jmxremote.port=12340  -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.password.file=${RESIN_HOME}/conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=${RESIN_HOME}/conf/jmxremote.access"exec $JAVA_EXE -jar ${RESIN_HOME}/lib/resin.jar ${ENV} $*

注释：
# -Djava.rmi.server.hostname=192.168.1.245    # 设置resin 注册JMX的IP地址，不设置连接不上，IP地址更具实际情况填写。
# -Dcom.sun.management.jmxremote.port=12340   # 设置resin 注册JMX的端口号，这里使用12340为resin注册JMX的端口号。
# -Dcom.sun.management.jmxremote.ssl=false    # 不支持ssl（ssl配置没成功）。
# -Dcom.sun.management.jmxremote.authenticate=false  # 关闭远程用户名和密码验证。如需要开启可以设为true，需要配置账号密码。
```

2、重启resin服务器，查看端口

```text theme={null}
# ss  -lnt | grep 12340
```

![2.1.4. Resin配置 操作截图 3](https://lwweb.oss-cn-shenzhen.aliyuncs.com/docs/images/yuque/resin/image-03.png)
