In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Tomcat deployment and optimization
1.Tomcat installation and deployment
two。 Virtual host configuration
3.Tomcat optimization
Tomcat introduction
1. Free, open source Web application server
A core project in the Jakarta project of 2.Apache Software Foundation (Apache Software Foundation)
3. Jointly developed by Apache, Sun and some companies and individuals
4. Deeply loved by Java enthusiasts, and recognized by some software developers
5. At present, the popular Web application server
Tomcat deployment steps
1. Download and install jdk
two。 Install and start Tomcat
3. Configure virtual host
Set environment variabl
1. Edit the / etc/profile file:
Export JAVA_HOME=/usr/java/jdk1.8.0_171-amd64export CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt,jarexport PATH=$JAVA_HOME/bin:$PATH
two。 Commands to make environment variables take effect:
[root@localhost~] # source / etc/profile
3. View the jdk version of the command:
[root@localhost~] # java-version install and start Tomcat
1. Download the installation package:
[root@localhost ~] # wget http://mirrors. Shu.edu.cn/apache/tomcat/tomcat-9/v9.0.8/bin/apache-tomcat-9.0.8.tar.gz
two。 Move the installation package to / usr/local and rename it:
[root@localhost ~] # mv apache-tomcat-9.0.8 / usr/ocal/tomcat
3. Start Tomcat:
[root@localhost ~] # / usr/local/tomcat/bin/startup.shTomcat startup time
1. Commands to shorten startup time
/ usr/java/jdk1.8.0_171-amd64/je/lib/security/java.security file
Securerandom.source=file:/dev/random is changed to urandomDemo:Tomcat installation [root@localhost ~] # mkdir / aaa [root@localhost ~] # mount.cifs / / 192.168.10.139/rpm / aaaPassword for root@//192.168.10.139/rpm: [root@localhost ~] # cd / aaa [root@localhost aaa] # lsamoeba-mysql-binary-2.2.0.tar.gz lf.jpgapr-1.6.2.tar.gz mysql-5 .5.24.tar.gzapr-util-1.6.0.tar.gz mysql-5.6.26.tar.gzhttpd-2.4.29.tar.bz2 TC [root@localhost aaa] # cd TC/ [root@localhost TC] # lsapache-jmeter-5.1apache-jmeter-5.1.zipapache-tomcat-9.0.16.tar.gzjdk-8u201-linux-x64.rpm [root@localhost TC] # rpm-ivh jdk-8u201- Linux-x64.rpm [root@localhost TC] # cd / usr/java/ [root@localhost java] # lsdefault jdk1.8.0_201-amd64 latest [root@localhost java] # cd jdk1.8.0_201-amd64/ [root@localhost jdk1.8.0_201-amd64] # lsbin manCOPYRIGHT README.htmlinclude releasejavafx-src.zip src.zipjre THIRDPARTYLICENSEREADME-JAVAFX.txtlib THIRDPARTYLICENSEREADME.txtLICENSE// setting Ring Context variable: [root@localhost jdk1.8.0_201-amd64] # vim / etc/profile press uppercase G to the last line Press the lowercase letter o to insert the following on the following line: when the export JAVA_HOME=/usr/java/jdk1.8.0_201-amd64export CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jarexport PATH=$JAVA_HOME/bin:$PATH// modification is complete, press Esc to exit insert mode Input: wq save and exit [root@localhost jdk1.8.0_201-amd64] # source / etc/profile [root@localhost jdk1.8.0_201-amd64] # java-versionjava version "1.8.0mm 201" Java (TM) SE Runtime Environment (build 1.8.0_201-b09) Java HotSpot (TM) 64-Bit Server VM (build 25.201-b09 Mixed mode) [root@localhost jdk1.8.0_201-amd64] # cd / aaa [root@localhost aaa] # lsDiscuz_X3.4_SC_UTF8.zip nginx-1.12.2.tar.gzerror.png php-7.1.10.tar.bz2extundelete-0.2.4.tar.bz2 php-7.1.20.tar.gzhttpd-2.4.29.tar.bz2 TC [root@localhost aaa] # cd TC/ [root@localhost TC] # lsapache-jmeter-5.1apache-jmeter-5.1.zipapache-tomcat-9.0.16.tar.gzjdk-8u201-linux-x64.rpm [root@localhost TC] # tar zxvf apache-tomcat-9.0.16.tar.gz-C / usr/local/ [root@localhost TC] # cd / usr/local/ [root@localhost local] # lsapache-tomcat-9.0.16 etc include lib64 sbin srcbin Games lib libexec share// is convenient to find later. Modify the folder name [root@localhost local] # mv apache-tomcat-9.0.16/ tomcat [root@localhost local] # lsbin games lib libexec share tomcatetc include lib64 sbin src [root@localhost local] # cd tomcat/ [root@localhost tomcat] # cd bin/ [root@localhost bin] # lsbootstrap.jar makebase.shcatalina.bat setclasspath.batcatalina.sh setclasspath.shcatalina-tasks.xml Shutdown.batciphers.bat shutdown.shciphers.sh startup.batcommons-daemon.jar startup.shcommons-daemon-native.tar.gz tomcat-juli.jarconfigtest.bat tomcat-native.tar.gzconfigtest.sh tool-wrapper.batdaemon.sh tool-wrapper.shdigest.bat version. Batdigest.sh version.shmakebase.bat [root@localhost bin] # ln-s / usr/local/tomcat/bin/startup.sh / usr/bin/ [root@localhost bin] # ln-s / usr/local/tomcat/bin/shutdown.sh / usr/bin/ [root@localhost bin] # systemctl stop firewalld.service [root@localhost bin] # setenforce 0 [root@localhost bin] # startup.sh Using CATALINA_BASE: / usr/local/tomcatUsing CATALINA_HOME: / usr/local/tomcatUsing CATALINA_TMPDIR: / usr/local/tomcat/tempUsing JRE_HOME: / usr/java/jdk1.8.0_201-amd64Using CLASSPATH: / usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jarTomcat started. At this time, use the host browser to enter the address: 192.168.18.145 8080, you can access the home page of Tomcat:
Tmocat is deployed successfully at this time, thank you for watching!
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.