小计IDEA远程部署服务器


idea maven远程部署服务器

1、配置 远程服务器tomcat的相关配置:
修改tomcat目录下的 bin/catalina.sh文件
添加相关的配置

export CATALINA_OPTS="-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=1099
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
#hostname是服务器的ip地址
-Djava.rmi.server.hostname=192.168.1.10"

export JAVA_OPTS="-Dcom.sun.management.jmxremote=
-Dcom.sun.management.jmxremote.port=1099
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false"

以上配置相当于给本地idea一个权限,jmx端口和hostname在idea中都需要配置

2、配置IDEA

1、Tools-->Deployment-->Configuration 里面设置远程服务器信息
选择文件上传方式为sftp

2、配置tomcat远程部署
在添加tomcat栏目中可以选择本地或者远程remote,这里需要选择remote部署
在里面配置服务器信息,以及要上传的目录,/var/webapp/tomcat/webapps/
在服务器里面配置

配置完成可以测试连接是否成功

然后直接启动本地服务器,在看则文件已经上传到远程服务器了

======================================

扫描二维码关注公众号,回复: 4977052 查看本文章

 具体记录,有空的时候贴出

猜你喜欢

转载自www.cnblogs.com/dayu007/p/10290307.html