loyalxuan 发表于 2018-12-3 14:11:49

CentOS5.4安装Tomcat6.0.18全程文字记录

Last login: Thu Dec 10 19:04:29 2009 from 192.168.1.81
# cd /opt/soft/Tomcat/
# ls -l
total 85972
-rw-r--r-- 1 root root6142197 Apr62009 apache-tomcat-6.0.18.tar.gz
-rw-r--r-- 1 root root 81792634 Nov9 16:38 jdk-6u17-linux-i586.bin
#为了能够安装JDK,需要给予JDK的安装文件运行权限
# chmod 777 jdk-6u17-linux-i586.bin
# ls -l
total 85972
-rw-r--r-- 1 root root6142197 Apr62009 apache-tomcat-6.0.18.tar.gz
-rwxrwxrwx 1 root root 81792634 Nov9 16:38 jdk-6u17-linux-i586.bin
#下面安装JDK
# ./jdk-6u17-linux-i586.bin
Sun Microsystems, Inc. Binary Code License Agreement
for the JAVA SE DEVELOPMENT KIT (JDK), VERSION 6
……中间的部分省略……
Do you agree to the above license terms?
yes
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
……中间的部分省略……
Java(TM) SE Development Kit 6 successfully installed.
Product Registration is FREE and includes many benefits:
* Notification of new versions, patches, and updates
* Special offers on Sun products, services and training
* Access to early releases and documentation
Product and system data will be collected. If your configuration
supports a browser, the Sun Product Registration form for
the JDK will be presented. If you do not register, none of
this information will be saved. You may also register your
JDK later by opening the register.html file (located in
the JDK installation directory) in a browser.
For more information on what data Registration collects and
how it is managed and used, see:
http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html
Press Enter to continue.....

Done.
#ls
apache-tomcat-6.0.18.tar.gzjdk1.6.0_17jdk-6u17-linux-i586.bin
#将JDK移动到/usr/local/java目录
# mv jdk1.6.0_17 /usr/local/java
# ls
apache-tomcat-6.0.18.tar.gzjdk-6u17-linux-i586.bin
# ls -l
total 85972
-rw-r--r-- 1 root root6142197 Apr62009 apache-tomcat-6.0.18.tar.gz
-rwxrwxrwx 1 root root 81792634 Nov9 16:38 jdk-6u17-linux-i586.bin
#至此,JDK安装完成,下面安装Tomcat。
#tar -zxvf apache-tomcat-6.0.18.tar.gz
apache-tomcat-6.0.18/bin/catalina.sh
apache-tomcat-6.0.18/bin/digest.sh
apache-tomcat-6.0.18/bin/setclasspath.sh
……中间的部分省略……
apache-tomcat-6.0.18/webapps/manager/sessionsList.jsp
apache-tomcat-6.0.18/webapps/manager/status.xsd
apache-tomcat-6.0.18/webapps/manager/xform.xsl
# ls
apache-tomcat-6.0.18apache-tomcat-6.0.18.tar.gzjdk-6u17-linux-i586.bin
#将TOMCAT移动到/usr/local/tomcat目录下。
# mv apache-tomcat-6.0.18 /usr/local/tomcat
#编辑/etc/profile文件,增加TOMCAT的环境变量。
# vi /etc/profile
# /etc/profile
# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc
……中间的部分省略……
unset pathmunge
export JAVA_HOME=/usr/local/java
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOMR/bin
export TOMCAT_HOME=/usr/local/tomcat
export CATALINA_HOME=/usr/local/tomcat
export CLASSPATH=$CLASSPATH:$CATALINA_HOME/common/lib
"/etc/profile" 65L, 1317C written
# cd /usr/local/tomcat/bin
# ls
bootstrap.jarcatalina-tasks.xmldigest.bat   service.bat       shutdown.batstartup.sh    tomcat-juli.jar       tool-wrapper.sh
catalina.bat   commons-daemon.jardigest.sh    setclasspath.batshutdown.sh   tomcat6.exe   tomcat-native.tar.gzversion.bat
catalina.sh    cpappend.bat      jsvc.tar.gzsetclasspath.sh   startup.bat   tomcat6w.exetool-wrapper.bat      version.sh
# ./startup.sh
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program
#设置的环境变量没有生效,需要重新登陆才可以。
# exit
logout
Last login: Fri Dec 11 09:43:57 2009 from 192.168.1.81
# cd /usr/local/tomcat/bin
# ls
bootstrap.jarcatalina-tasks.xmldigest.bat   service.bat       shutdown.batstartup.sh    tomcat-juli.jar       tool-wrapper.sh
catalina.bat   commons-daemon.jardigest.sh    setclasspath.batshutdown.sh   tomcat6.exe   tomcat-native.tar.gzversion.bat
catalina.sh    cpappend.bat      jsvc.tar.gzsetclasspath.sh   startup.bat   tomcat6w.exetool-wrapper.bat      version.sh
# ./startup.sh
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:       /usr/local/java
#好了,CentOS 5.4下安装JDK 6 Update 17和Tomcat 6.0.18完成。



页: [1]
查看完整版本: CentOS5.4安装Tomcat6.0.18全程文字记录