Setup configuration tomcat under Linux

  • 2020-06-15 10:35:28
  • OfStack

First you need to install configuration JDK, here is a brief review.Linux use root to create jvm folder under /opt/ folder, then use ES6en-ES7en ES8en-8u121-ES10en-ES11en64. tar. gz-ES14en /opt/jvm/ to unzip the file into jvm, then modify /etc/profile file as root, add in the last 4 lines:

export JAVA_HOME=/opt/jvm/jdk1.8.0_121
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH

Save and exit.

Once the environment variables are configured, you can view the existing environment variables using the sudo ES35en-ES36en --config java command.

java-version tests whether JDK was installed successfully.

Let's get down to business and install and configure tomcat.

1. Download tomcat:

Core:

zip (pgp, md5, sha1) tar.gz (pgp, md5, sha1)

Go to tomcat website and click download to download zip or ES61en.gz.

2. Unzip to /home/ folder

3, enter the folder, add the execution permission. Command: :~/apache-tomcat-9.0.0.M21/bin$ sudo chmod +x *.sh

4, :~/apache-tomcat-9.0.0.M21/bin$ ./startup.sh

Successful startup.

View the log:

:~/apache-tomcat-9.0.0.M21/logs$ cat catalina.out

Open a browser and enter the url localhost:8080 to enter the home page.


Related articles: