Tomcat is a lightweight application server that is commonly used in small and medium-sized systems and situations where there are not many concurrent access users. It is the first choice for developing and debugging JSP programs. For a beginner, you can think of it this way: when the Apache server is configured on a machine, it can be used to respond to access requests for HTML pages.
First you need toinstallconfigure the JDK. Here is a brief review.LinuxUse root identity to create a jvm folder in the /opt/ folder, and then use tar - zxvf jdk-8u121-linux-x64.tar.gz -C /opt/jvm/ Extract the file to jvm, then modify the /etc/profile file as root and add the last four lines:
export JAVA_HOME=/opt/jvm/jdk1.8.0_121 export JRE_HOME=${JAVA_HOME}/jre export CLASS PATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib export PATH=${JAVA_HOME}/bin:$PATH
SaveExit.
After configuring the environmentvariables, you can use the sudo update-alternatives --config java command to view existing environment variables.
java -version tests whether the JDK is installed successfully.
Let’s get to the point and install and configure tomcat.
1. Download tomcat:
Core:
2. Unzip it to the /home/ folder
3. Enter the folder and add execution permission. Command:
:~/apache-tomcat-9.0.0.M21/bin$ sudochmod +x *.sh<a href="//m.sbmmt.com/wiki/1294.html" target="_blank"></a>
4,
started successfully.
View the log:
:~/apache-tomcat-9.0.0.M21/logs$ cat catalina.outOpen the browser, Enter the URL: localhost:8080 to enter the home page.
The above is the detailed content of Detailed introduction to installing and configuring tomcat under Linux. For more information, please follow other related articles on the PHP Chinese website!