Detailed introduction to installing and configuring tomcat under Linux

黄舟
Release: 2017-05-28 11:37:08
Original
1824 people have browsed it

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
Copy after login

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:

  • ##zip (pgp, md5, sha1)

  • ##tar.gz (pgp, md5, sha1)
  • Enter tomcat official website and click download, Download both zip or tar.gz.

2. Unzip it to the /home/ folder

3. Enter the folder and add execution permission. Command:

:~/apache-tomcat-9.0.0.M21/bin$ sudo

chmod +x *.sh<a href="http://www.php.cn/wiki/1294.html" target="_blank"></a>4,

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

started successfully.

View the log:

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

Open 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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!