close
下載JAVA & TOMCAT
[root@localhost ~]# wget http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u21-linux-i586.bin?BundledLineItemUUID=jpGJ_hCu.kQAAAEqUdoSMh0m&OrderID=zcWJ_hCu86wAAAEqRtoSMh0m&ProductID=LxaJ_hCy4mIAAAEpXLwzBGsB&FileName=/jdk-6u21-linux-i586.bin
[root@localhost ~]# wget http://ftp.mirror.tw/pub/apache/tomcat/tomcat-6/v6.0.29/bin/apache-tomcat-6.0.29.tar.gz
[root@localhost ~]# wget http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u21-linux-i586.bin?BundledLineItemUUID=jpGJ_hCu.kQAAAEqUdoSMh0m&OrderID=zcWJ_hCu86wAAAEqRtoSMh0m&ProductID=LxaJ_hCy4mIAAAEpXLwzBGsB&FileName=/jdk-6u21-linux-i586.bin
[root@localhost ~]# wget http://ftp.mirror.tw/pub/apache/tomcat/tomcat-6/v6.0.29/bin/apache-tomcat-6.0.29.tar.gz
增加執行權限
[root@localhost ~]# chmod a+x jdk-6u21-linux-i586.bin
[root@localhost ~]# chmod a+x jdk-6u21-linux-i586.bin
執行安裝與移動目錄
[root@localhost ~]# ./jdk-6u21-linux-i586.bin
[root@localhost ~]# ./jdk-6u21-linux-i586.bin
[root@localhost ~]# mv jdk1.6.0_21/ /usr/java/jdk1.6.0_21
編輯環境變數
[root@localhost ~]# vi /etc/profile
export JAVA_HOME=/usr/java/jdk1.6.0_21
export JRE_HOME=/usr/java/jdk1.6.0_21/jre
[root@localhost ~]# vi /etc/profile
export JAVA_HOME=/usr/java/jdk1.6.0_21
export JRE_HOME=/usr/java/jdk1.6.0_21/jre
登出重新載入環境變數
[root@localhost ~]# logout
[root@localhost ~]# logout
確認環境變數
[root@localhost ~]# echo $JAVA_HOME
[root@localhost ~]# echo $JRE_HOME
[root@localhost ~]# echo $JAVA_HOME
[root@localhost ~]# echo $JRE_HOME
解壓縮與移動tomcat
[root@localhost ~]# tar -xzvf apache-tomcat-6.0.29.tar.gz
[root@localhost ~]# mv /root/apache-tomcat-6.0.29 /usr/local
[root@localhost ~]# tar -xzvf apache-tomcat-6.0.29.tar.gz
[root@localhost ~]# mv /root/apache-tomcat-6.0.29 /usr/local
啟動與停止tomcat
[root@localhost ~]# cd /usr/local/apache-tomcat-6.0.29/bin
[root@localhost ~]# ./startup.sh
[root@localhost ~]# ps -ef | grep tomcat
[root@localhost ~]# ./shutdown.sh
[root@localhost ~]# ps -ef | grep tomcat
[root@localhost ~]# cd /usr/local/apache-tomcat-6.0.29/bin
[root@localhost ~]# ./startup.sh
[root@localhost ~]# ps -ef | grep tomcat
[root@localhost ~]# ./shutdown.sh
[root@localhost ~]# ps -ef | grep tomcat
變更tomcat預設埠設定
[root@localhost ~]# vi /usr/local/apache-tomcat-6.0.29/conf/server.xml
<Connector port="8080" protocol="HTTP/1.1"
##Change to port="80"
<Connector port="80" protocol="HTTP/1.1"
[root@localhost ~]# vi /usr/local/apache-tomcat-6.0.29/conf/server.xml
<Connector port="8080" protocol="HTTP/1.1"
##Change to port="80"
<Connector port="80" protocol="HTTP/1.1"
全站熱搜
留言列表