目錄:java
一.環境shell
1.1 系統環境apache
1.2 軟件環境bootstrap
1.3 軟件版本tomcat
二. 安裝tcp
2.1 下載軟件ui
2.2 安裝spa
三.驗證.net
正文code
一.環境
1.1 系統環境 CENTOS 6.6
[root@gtproxy-pa-1 ~]# lsb_release -a LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 6.6 (Final) Release: 6.6 Codename: Final [root@gtproxy-pa-1 ~]#
1.2 軟件環境 SUN JDK 1.6
安裝地址:http://my.oschina.net/u/234018/blog/498118
[root@gtproxy-pa-1 ~]# java -version java version "1.6.0_45" Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode) [root@gtproxy-pa-1 ~]# javac -version javac 1.6.0_45 [root@gtproxy-pa-1 ~]#
1.3 軟件版本
apache-tomcat-7.0.63
二 安裝
2.1 下載地址
百度網盤:連接:http://pan.baidu.com/s/1ntzQVzF 密碼:9o0o
2.2 安裝
2.1 壓縮包解壓到要安裝的目錄
tar -zxvf /soft/apache-tomcat-7.0.63.tar.gz
2.2 啓動tomcat
[root@gtproxy-pa-1 bin]# pwd /usr/local/apache-tomcat-7.0.63/bin [root@gtproxy-pa-1 bin]# ./startup.sh
三 驗證
3.1 直接點直接訪問 http:x.x.x.x:8080
3.2 含蓄點 檢查下進程是否啓,端口是否監聽
[root@gtproxy-pa-1 bin]# netstat -an | grep 8080 tcp 0 0 :::8080 :::* LISTEN [root@gtproxy-pa-1 bin]# ps -ef | grep tomcat root 23512 23356 0 17:11 pts/0 00:00:00 grep tomcat root 27856 1 0 Aug25 ? 00:21:40 /usr/local/jdk1.6.0_45/bin/java -Djava.util.logging.config.file=/usr/local/apache-tomcat-7.0.63/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/local/apache-tomcat-7.0.63/endorsed -classpath /usr/local/apache-tomcat-7.0.63/bin/bootstrap.jar:/usr/local/apache-tomcat-7.0.63/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/apache-tomcat-7.0.63 -Dcatalina.home=/usr/local/apache-tomcat-7.0.63 -Djava.io.tmpdir=/usr/local/apache-tomcat-7.0.63/temp org.apache.catalina.startup.Bootstrap start
四 配置tomcat 管理用戶
修改 /usr/local/apache-tomcat-7.0.63/conf/tomcat-users.xml
<role rolename="admin-gui"/> <role rolename="admin-script"/> <role rolename="manager-gui"/> <role rolename="manager-script"/> <role rolename="manager-jmx"/> <role rolename="manager-status"/> <user username="tomcat" password="tomcat" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-script,admin-gui"/>