您好,登錄后才能下訂單哦!
安裝Tomcat筆記:
軟件:
jdk:jdk-8u5-linux-i586.gz
下載地址:http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-i586.tar.gz?AuthParam=1403144208_59294832a3097c8f36b5e2e2df5e340a
更多版本jdk下載:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
tomcat:apache-tomcat-6.0.41.tar.gz
下載地址:http://apache.fayea.com/apache-mirror/tomcat/tomcat-6/v6.0.41/bin/apache-tomcat-6.0.41.tar.gz
[root@node1 bin]# rpm -qa |grep java //查看當前系統是否安裝了rpm包的jdk
java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64
java_cup-0.10k-5.el6.x86_64
gcc-java-4.4.7-4.el6.x86_64
[root@node1 bin]# rpm -e java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64 --nodeps //卸載掉rpm裝的jdk
一、安裝配置jdk
1、解壓,并移動到/usr/local下面
[root@node1 tmp]# tar -xf jdk-8u5-linux-i586.gz
[root@node1 tmp]# mv jdk1.8.0_05/ /usr/local/jdk
2、設置java環境變量
[root@node1 tmp]# vi /etc/profile
JAVA_HOME=/usr/local/jdk
PATH=$PATH:$JAVA_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export JAVA_HOME CLASSPATH
[root@node1 tmp]# source /etc/profile
3、查看jdk是否生效
[root@node1 tmp]# java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) Client VM (build 25.5-b02, mixed mode)
二、安裝配置tomacat
1、解壓,并移動到/usr/local下
[root@node1 tmp]# tar xf apache-tomcat-6.0.41.tar.gz
[root@node1 tmp]# mv apache-tomcat-6.0.41 /usr/local/tomcat
2、設置tomcat環境變量
[root@node1 tmp]# vi /etc/profile
export CATALINA_HOME="/usr/local/tomcat"
export CATALINA_BASE="/usr/local/tomcat"
[root@node1 tmp]# source /etc/profile
3、啟動tomcat
[root@node1 ~]# cd /usr/local/tomcat/bin/
[root@node1 bin]# ./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/jdk
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar
[root@node1 local]# netstat -anlpt |grep java
tcp 0 0 ::ffff:127.0.0.1:8005 :::* LISTEN 3489/java
tcp 0 0 :::8009 :::* LISTEN 3489/java
tcp 0 0 :::8080 :::* LISTEN 3489/java
4、訪問tomcat
http://ip:8080
5、關閉tomcat
[root@node1 ~]# cd /usr/local/tomcat/bin/
[root@node1 bin]# ./shutdown.sh
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。