Tomcat配置安裝

weixin_34321977發表於2016-11-30
1. 安裝java開發環境JDK

根據自己系統的版本選擇合適的JDK RPM安裝包
因為RPM預設已經設定好java相關的環境變數,可以節省很多不必要的錯誤
RPM包安裝完預設路徑為/usr/java
JDK下載官網:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

[root@linux1 ~]# yum install wget -y
[root@linux1 ~]# wget http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.rpm?AuthParam=1480483000_0ae69c584b923f9375e91ac5b73a645f
[root@linux1 ~]# yum install jdk-8u111-linux-x64.rpm -y
判斷是否安裝成功
[root@linux1 ~]# java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
2. 安裝apache-tomcat

在tomcat官方網站下載二進位制安裝包:
http://tomcat.apache.org/

[root@linux1 ~]# tar zxvf apache-tomcat-7.0.73.tar.gz
[root@linux1 ~]# mv apache-tomcat-7.0.73 /usr/local/tomcat

啟動tomcat

[root@linux1 ~]#/usr/local/tomcat/bin/catalina.sh start

檢視是否為安全啟動:

[root@linux1 ~]# netstat -lntup | grep 8080
tcp        0      0 :::8080                     :::*                        LISTEN      1662/java 
[root@linux1 ~]# ps -ef | grep tomcat 
root       1662      1  1 00:33 pts/1    00:00:08 /usr/bin/java -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.endorsed.dirs=/usr/local/tomcat/endorsed -classpath /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root       1723   1404  0 00:43 pts/1    00:00:00 grep tomcat
3. 登陸localhos:8080檢視
1708599-85eb7ab9c662a459.png
Tomcat
4. tomcat配置檔案詳解

轉載:http://www.blogjava.net/baoyaer/articles/107278.html

相關文章