In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
#
# Tomcat 8 official documentation: http://tomcat.apache.org/tomcat-8.0-doc/setup.html
# Tomcat 8 download address: http://tomcat.apache.org/download-80.cgi
# Tomcat needs the support of JDK to run
# JDK download address: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
# configuration reference: http://www.cnblogs.com/guojuncheng/p/5851954.html
# system version
[root@node4 ~] # cat / etc/redhat-release CentOS Linux release 7.2.1511 (Core)
# turn off the firewall and selinux
[root@node4 ~] # systemctl stop firewalld [root@node4 ~] # setenforce 0
# JDK installation (download the software by yourself)
[root@node4 ~] # tar-xf jdk-8u131-linux-x64.tar.gz-C / usr/local/ [root@node4 ~] # ln-s / usr/local/jdk1.8.0_131 / usr/local/jdk# configuration environment variable [root@node4 ~] # vim / etc/profile# add the following three lines [root@node4 ~] # tail-3 / etc/profileexport JAVA_HOME=/usr/local/jdkexport CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_ HOME/lib/tools.jarexport PATH=$PATH:$JAVA_HOME/ [root @ node4 ~] # source / etc/profile [root@node4 ~] # java-versionjava version "1.8.0mm 131" Java (TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot (TM) 64-Bit Server VM (build 25.131-b11 Mixed mode) [root@node4 ~] #
# Tomcat installation (binary installation)
[root@node4 ~] # tar-xf apache-tomcat-8.5.15.tar.gz-C / usr/local/ [root@node4 ~] # ln-s / usr/local/apache-tomcat-8.5.15 / usr/local/tomcat
# start the service
[root@node4 ~] # / usr/local/tomcat/bin/startup.sh [root@node4 ~] # netstat-lntup | grep 8080tcp6 0 0:: 8080: * LISTEN 2764/java [root@node4 ~] #
# access
# configuration reference: http://www.cnblogs.com/guojuncheng/p/5851954.html
# jar package reference: http://blog.csdn.net/helloxiaoliang/article/details/39030909
# Directory structure
[root@node4] # cd / usr/local/tomcat/ [root@node4 tomcat] # lltotal 100drwxr Murray. 2 root root 4096 May 14 23:07 bin # Tomcat execute script directory drwx-. 3 root root 4096 May 14 23:10 conf # Tomcat configuration file directory drwxr-x---. 2 root root 4096 May 14 23:07 Library File required for lib # Tomcat to run-rw-r-. 1 root root 57092 May 5 19:06 LICENSE drwxr-x---. 2 root root 4096 May 14 23:10 logs # Tomcat execution log storage directory-rw-r-. 1 root root 1723 May 5 19:06 NOTICE-rw-r-. 1 root root 7064 May 5 19:06 RELEASE-NOTES-rw-r-. 1 root root 15946 May 5 19:06 RUNNING.txtdrwxr-x---. 2 root root 29 May 14 23:07 temp # Tomcat temporary directory drwxr-x---. 7 root root 76 May 5 19:03 webapps # Tomcat's main web release directory (stores our own JSP,serlet, classes) drwxr-x---. 3 root root 21 May 14 23:10 the working directory of work # Tomcat, where Tomcat puts the JAVA file and class file translated by JSP [root@node4 tomcat] #
# bin directory
[root@node4 tomcat] # ll bin/total 812 RW Murray. 1 root root 34529 May 5 19:03 bootstrap.jar-rw-r-. 1 root root 14505 May 5 19:03 script used under catalina.bat # windows-rwxr-x---. 1 root root 21793 May 5 19:03 script for starting and shutting down Tomcat services under catalina.sh # linux-rw-r-. 1 root root 1664 May 5 19:06 catalina-tasks.xml-rw-r-. 1 root root 24283 May 5 19:03 commons-daemon.jar-rw-r-. 1 root root 204944 May 5 19:03 commons-daemon-native.tar.gz-rw-r-. 1 root root 2040 May 5 19:03 script used under configtest.bat # windows-rwxr-x---. 1 root root 1922 May 5 19:03 script for checking configuration files under configtest.sh # linux-rwxr-x---. 1 root root 7735 May 5 19:03 daemon.sh-rw-r-. 1 root root 2091 May 5 19:03 digest.bat-rwxr-x---. 1 root root 1965 May 5 19:03 digest.sh-rw-r-. 1 root root 3147 May 5 19:03 setclasspath.bat-rwxr-x---. 1 root root 3306 May 5 19:03 setclasspath.sh-rw-r-. 1 root root 2020 May 5 19:03 shutdown.bat-rwxr-x---. 1 root root 1902 May 5 19:03 shutdown.sh # linux close tomcat script-rw-r-. 1 root root 2022 May 5 19:03 startup.bat-rwxr-x---. 1 root root 1904 May 5 19:03 startup.sh # linux launch tomcat script-rw-r-. 1 root root 41150 May 5 19:03 tomcat-juli.jar-rw-r-. 1 root root 399836 May 5 19:03 tomcat-native.tar.gz-rw-r-. 1 root root 3621 May 5 19:03 tool-wrapper.bat-rwxr-x---. 1 root root 4579 May 5 19:03 tool-wrapper.sh-rw-r-. 1 root root 2026 May 5 19:03 version.bat-rwxr-x---. 1 root root 1908 May 5 19:03 version.sh [root@node4 tomcat] #
# conf directory
[root@node4 tomcat] # ll conf/total 224drwxr Murray. 3 root root 22 May 14 23:10 Catalina-rw-. 1 root root 12895 May 5 19:06 catalina.policy # Java-related security policy profile that provides access control at the system resource level-rw-. 1 root root 7376 May 5 19:06 catalina.properties # tomcat Internal package definition and access related controls-rw-. 1 root root 1338 May 5 19:06 default configuration information for host used in context.xml #-rw-. 1 root root 1149 May 5 19:06 jaspic-providers.xml-rw-. 1 root root 2358 May 5 19:06 jaspic-providers.xsd-rw-. 1 root root 3622 May 5 19:06 logging.properties # used to record configuration information for operation-related logs-rw-. 1 root root 7511 May 5 19:06 server.xml # Tomcat main configuration file-rw-. 1 root root 2164 May 5 19:06 tomcat-users.xml # Tomcat user Authentication profile-rw-. 1 root root 2633 May 5 19:06 tomcat-users.xsd-rw-. 1 root root 168251 May 5 19:06 web.xml # File that sets the default values for web applications with different Tomcat configurations [root@node4 tomcat] #
# logs directory
[root@node4 tomcat] # ll logs/total 24, RW, RW, RMI. 1 root root 6491 May 14 23:10 catalina.2017-05-14.log # tomcat startup and shutdown log-rw-r-. 1 root root 6491 May 14 23:10 catalina.out # tomcat startup and shutdown log-rw-r-. 1 root root 0 May 14 23:10 host-manager.2017-05-14.log-rw-r-. 1 root root 280 May 14 23:10 localhost.2017-05-14.log # errors and other logs-rw-r-. 1 root root 755 May 14 23:12 localhost_access_log.2017-05-14.txt # access Log-rw-r-. 1 root root 0 May 14 23:10 manager.2017-05-14.log # Management Log [root@node4 tomcat] #
# server.xml configuration details reference: http://www.zyops.com/java-tomcat
Three operating modes of tomcat
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.