Install Tomcat under ubuntu

1. Upload the attachment to the /user/tomcat directory

2. Unzip the file: tar -zxvf apache-tomcat-8.5.29.tar.gz

3. Then enter the directory /usr/tomcat/bin, edit the file startup.sh, and add the following at the end of the file:

export JAVA_HOME=/usr/java/jdk1.8.0_161

export JRE_HOME=${JAVA_HOME}/jre

export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib

export PATH=.:${JAVA_HOME}/bin:$PATH

 

export TOMCAT_HOME=/usr/tomcat

4. Then execute startup.sh, and then visit 127.0.0.1:8080 to see if it can start normally.

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326024254&siteId=291194637