Idea 2019.2 (Ultimate Edition) to deploy the project to a remote Linux server tomcat and deploy to the cloud server Detailed Ali

Preface : Before doing the project, the local source has been labeled as war package uploaded to a remote server tomcat / webapps. Every time labeled as war re-deployment of the project, I feel particularly cumbersome.

Step :

1, environment configuration

 Prerequisites: Make sure tomcat installed on a remote linux server.

2, Linux server configuration tomcat

(1) We found the installation directory of tomcat in Linux:

(2) catalina.sh found in the bin under the tomcat, the remote release catalina.sh need to add some configuration in the startup script:

Edit catalina.sh file:

Press inset key to enter edit mode, the following configuration file:

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
-Djava.rmi.server.hostname=192.168.0.171"
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"

Description: One of the 1099 port, you need to check in before the configuration is occupied, if occupied, you need to change other ports; -Djava.rmi.server.hostname = 192.168.0.171 in "192.168.0.171" is the ip address your remote server.

As configured, the remote server is basically ok, now need to start up, you can go to the local browser, enter: " http://192.168.0.171:8081 " tomcat start to see the success of the interface. 8081 which is on my linux tomcat server port number, based on individual actual circumstances.

3, the local side configuration idea

Add remote server tomcat server:

Figure configurations herein as follows:

deploy:

success:

 

Ali deployed to the cloud server :

1, Ali cloud linux server configuration:

    As with the above, only the following configuration in catalina.sh:

export CATALINA_OPTS="-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=1099

-Dcom.sun.management.jmxremote.rmi.port=1099

-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=192.168.0.171"
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"

2, the local configuration and the end idea as the above-described configuration.

  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

   

 

Guess you like

Origin www.cnblogs.com/zx-jy/p/11389394.html