In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Foreword:
JDK (Java Development Kit) is Sun Microsystems's product for Java developers. Since the launch of Java, JDK has become the most widely used java SDK. JDK is the core of the entire Java, including the Java runtime environment, Java tools and Java basic class libraries. Therefore, in order to run jsp programs must have the support of JDK, of course, the premise of installing Tomcat is to install JDK.
1. JDK installation
1. View os version
[root@MySQL] # uname-a
Linux mysql 2.6.32-200.13.1.el5uek # 1 SMP Wed Jul 27 21:02:33 EDT 2011 x86 "64 GNU/linux
Explanation: if there is x86x64, it is 64-bit, and if not, it is 32-bit. Followed by x686 or x86164, the kernel is 64-bit, and i686 or i386 is 32-bit.
two。 Download the installation package
Download JDK at http://www.Oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html,
I download [jdk-8u131-linux-x64.tar.gz], as shown in the following figure:
3. Install Java JDK8.0
Then mv the downloaded JDK installation package to the local folder
[root@mysql ~] # mv jdk-8u131-linux-x64.tar.gz / usr/local/
3.2.Jump under local:
[root@mysql ~] # cd / usr/local/
[root@mysql local] # ll jdk-8u131-linux-x64.tar.gz
-rw-r--r-- 1 root root 185540433 Jun 17 17:08 jdk-8u131-linux-x64.tar.gz
3.3.Redecompress the JDK
[root@mysql local] # tar zxvf jdk-8u131-linux-x64.tar.gz
4. Configure environment variables
Add Java-related environment variables to the / etc/profile file and copy the following to the bottom:
JAVA_HOME=/usr/local/jdk1.8.0_131
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar
Export PATH JAVA_HOME CLASSPATH
Note: according to the above configuration information, we can complete the configuration of environment variables, it should be noted that when configuring PATH, we must put JAVA_HOME/bin first, otherwise, when using the java command, the system will find the previous java and stop looking down, so that the directory where the executable file runs is not actually under $JAVA_HOME/bin, but in other directories, it will cause great problems.
4.2. Effective immediately
[root@mysql local] # source / etc/profile
5. Verify that the installation is successful
[root@mysql local] # java-version
Java version "1.8.0,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)
Second, install apache-tomcat-7.0.78
Foreword:
Tomcat server is a free and open source Web application server, which is a lightweight application server. It is widely used in small and medium-sized systems and not many concurrent access users. It is the first choice for developing and debugging JSP programs. For a beginner, it can be thought that when an Apache server is configured on a machine, it can be used to respond to requests for access to HTML pages. The Tomcat part is actually an extension of the Apache server, but it runs independently, so when you run tomcat, it actually runs as a separate process from Apache.
1. Jdk version requirements for installing apache-tomcat-7.0.78 version
Tomcat 7.0 requires Java SE 6 or later.
Read the RELEASE-NOTES and the RUNNING.txt file in the distribution for more details.
2. Os to view the JDK version
[root@mysql ~] # java-version
Java version "1.8.0,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)
3. Install apache-tomcat-7.0.78
The download URL of apache-tomcat-7.0.78 is http://tomcat.apache.org/download-70.cgi. The screenshot is as follows:
_ _
Then mv the downloaded apache-tomcat-7.0.78.tar.gz installation package to the / usr/local/tomcat_1/ folder
[root@mysql ~] # mkdir / usr/local/tomcat_1/
[root@mysql ~] # cp apache-tomcat-7.0.78.tar.gz / usr/local/tomcat_1/
3.2.Jump under local:
[root@mysql ~] # cd / usr/local/tomcat_1/
[root@mysql tomcat_1] # ll apache-tomcat-7.0.78.tar.gz
-rw-r--r-- 1 root root 8968516 Jun 18 09:43 apache-tomcat-7.0.78.tar.gz
3.3.Redecompress the apache-tomcat-7.0.78.tar.gz
[root@mysql tomcat_1] # tar-zxvf apache-tomcat-7.0.78.tar.gz
3.4.Placement of catalina.sh under / etc/init.d/ to prepare for tomcat startup
[root@mysql tomcat_1] # cp-p / usr/local/tomcat_1/apache-tomcat-7.0.78/bin/catalina.sh / etc/init.d/tomcat_1
3.5Editing / etc/init.d/tomcat_1
Vim / etc/init.d/tomcat_1
Add the following to the second line:
# chkconfig: 112 63 37
# description: tomcat server init script
# Source Function Library
. / etc/init.d/functions
JAVA_HOME=/usr/local/jdk1.8.0_131/
CATALINA_HOME=/usr/local/tomcat_1/apache-tomcat-7.0.78
4. Modify permissions and create directories
[root@mysql tomcat] # chmod 755 / etc/init.d/tomcat_1
[root@mysql tomcat] # chkconfig-- add tomcat_1
[root@mysql tomcat] # chkconfig tomcat_1 on
In the same way, configure tomcat2, and pay attention to the corresponding changes, such as / usr/local/tomcat_1/ to / usr/local/tomcat_2/
_ _ _
5. Modify the port in server.xml in each tomcat instance
[root@mysql apache-tomcat-7.0.78] # pwd
/ usr/local/tomcat_2/apache-tomcat-7.0.78
[root@mysql apache-tomcat-7.0.78] # cat conf/server.xml
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.