In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Configure Tomcat
Install Tomcat first
Installing Tomcat is divided into two steps: installing Tomcat and installing JDK.
JDK (Java Development Kit) is a product developed by Sun Microsystems for Java. Since the launch of Java, JDK has become the most widely used Java SDK. JDK is the core of the whole Java, including Java runtime environment, Java tools and Java basic class libraries. Therefore, if you want to run a Java program, you must have the support of JDK, and the prerequisite for installing Tomcat is to install JDK.
Install JDK
# after uploading the JDK package, put it in the / usr/local/ directory Then extract [root@DaMoWang ~] # tar xf jdk-10.0.2_linux-x64_bin.tar.gz-C / usr/local/ [root@DaMoWang ~] # cd / usr/local/ [root@DaMoWang local] # mv jdk-10.0.2/ jdk10 # set the environment variable [root@DaMoWang local] # vim / etc/profile JAVA_HOME=/usr/local/jdk10/ JAVA_BIN=/usr/local/jdk10/bin JRE_HOME=/usr/local / jdk10/jre PATH=$PATH:/usr/local/jdk10/bin:/usr/local/jdk10/jre/bin CLASSPATH=/usr/local/jdk10/lib:/usr/local/jdk10/jre/lib/charsets/jar [root@DaMoWang local] # source / etc/profile # make the configuration file effective [root@DaMoWang local] # java-version java version "10.0.2" 2018-07-17 Java (TM) SE Runtime Environment 18.3 (build 10.0.2 / 13) Java HotSpot (TM) 64- Bit Server VM 18.3 (build 10.0.2o13 Mixed mode) # if the display is not java version but openjdk version, then do the following: [root@DaMoWang local] # mv `which java` {, .bak} [root@DaMoWang local] # source / etc/profile # you can also use openjdk directly
Install Tomcat
# because it is a binary package, it eliminates the compilation process [root@DaMoWang ~] # tar xf apache-tomcat-9.0.10.tar.gz [root@DaMoWang ~] # mv apache-tomcat-9.0.10/ / usr/local/tomcat [root@DaMoWang ~] # cd / usr/local/tomcat [root@DaMoWang tomcat] # bin/startup.sh # start Tomcat
Use the netstat command to see if the startup is successful
# normally there are three ports 8005, 8009 and 8080, of which 8080 is the port for providing web services, 8005 is the management port, and 8009 is the port for third-party service calls. For example, [root@DaMoWang tomcat] # netstat-lntp is used when httpd and Tomcat are combined. | grep java tcp6 00 127.0.0.1 root@DaMoWang tomcat 8005: * LISTEN 3430/java tcp6 00:: 8009:: * LISTEN 3430/java tcp6 00: 8080:: * LISTEN 3430/java
Configure Tomcat
The installation process of Tomcat is very simple, but the configuration of Tomcat is not much.
Configure the access port for the Tomcat service
The default port of Tomcat is 8080. If you want to modify it, you need to modify conf/server.xml in the installation directory.
[root@DaMoWang tomcat] # vim conf/server.xml # found
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.