Java project deployment linux

Preparations: jdk1.8, tomcat-8.5.42, MySQL (installed next write separately), driver.war (my war package), driver.sql (database statement)

1.mkdir /usr/java /usr/tomcat

The package jdk1.8 the tar and the tar package tomcat8.5 uploaded to / usr / java under Linux, / usr / tomcat;

Extract the tar package: tar xvf package name

2.vi / etc / profile configuration environment variable

# Add the Java environment variables
JAVA_HOME = / usr / the Java / jdk1.8.0_11
# add tomcat environment variable
CATALINA_HOME = / usr / tomcat / tomcat-8.5.42
the PATH = $ the PATH: $ JAVA_HOME / bin: $ CATALINA_HOME / bin
the CLASSPATH =. / $ JAVA_HOME / bin: $ CATALINA_HOME / lib
Export JAVA_HOME CATALINA_HOME the PATH the CLASSPATH

3. configuration, source / etc / profile

4.java -version

Verify that the configuration is successful Java

5.cd /usr/tomcat/tomcat8.5/bin | startup.sh

In the browser enter the Linux ip address: port number, you can access is tomcat successfully started!

6. Install MySQL

6. Place the prepared driver.war package from the local to upload files tomcat8.5 webapps directory on the server under Linux

7. Restart tomcat, in the browser enter the Linux ip address: port number /login.html (web address)

Guess you like

Origin www.cnblogs.com/cgfpx/p/11750130.html