From Evernote: |
5. 架設Tomcat 6 MySql VPS CentOs 6 安裝Tomcat60 |
5. 安裝Tomcat60
先到 /usr/share/下,下戴Tomcat60,連結網址參照http://tomcat.apache.org/download-60.cgi
5-1 先到 /usr/share/下,下戴Tomcat60,連結網址參照http://tomcat.apache.org/download-60.cgi
[root@jay /]# cd /usr/share/ #換目錄 #↓下戴tomcat [root@jay share]# sudo wget http://ftp.twaren.net/Unix/Web/apache/tomcat/tomcat-6/v6.0.37/bin/apache-tomcat-6.0.37.tar.gz --2013-07-16 05:07:06-- http://ftp.twaren.net/Unix/Web/apache/tomcat/tomcat-6/v6.0.37/bin/apache-tomcat-6.0.37.tar.gz Resolving ftp.twaren.net... 140.110.123.9, 2001:e10:5c00:5::9 Connecting to ftp.twaren.net|140.110.123.9|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 6885442 (6.6M) [application/x-gzip] Saving to: `apache-tomcat-6.0.37.tar.gz' 100%[========================================================>] 6,885,442 608K/s in 15s 2013-07-16 05:07:22 (449 KB/s) - `apache-tomcat-6.0.37.tar.gz' saved [6885442/6885442] [root@jay share]# |
5-2 解壓Tomcat60 與改目錄名
[root@jay share]# sudo tar -xzf apache-tomcat-6.0.37.tar.gz #解壓tomcat [root@jay share]# mv apache-tomcat-6.0.37 tomcat60 #改目錄名 |
5-3-1 啟動Tomcat60
[root@jay ~]# sudo /usr/share/tomcat60/bin/startup.sh #啟動tomcat Using CATALINA_BASE: /usr/share/tomcat60 Using CATALINA_HOME: /usr/share/tomcat60 Using CATALINA_TMPDIR: /usr/share/tomcat60/temp Using JRE_HOME: /usr Using CLASSPATH: /usr/share/tomcat60/bin/bootstrap.jar [root@jay ~]# |
5-3-2 關閉Tomcat60
[root@jay bin]# sudo /usr/share/tomcat60/bin/shutdown.sh #關閉tomcat Using CATALINA_BASE: /usr/share/tomcat60 Using CATALINA_HOME: /usr/share/tomcat60 Using CATALINA_TMPDIR: /usr/share/tomcat60/temp Using JRE_HOME: /usr Using CLASSPATH: /usr/share/tomcat60/bin/bootstrap.jar [root@jay bin]# |
5-4 改Tomcat60的port 至80
修改前先關閉Tomcat60 ,修改後在開Tomcat60
[root@jay bin]# vi /usr/share/tomcat60/conf/server.xml #編輯tomcat的server 設定檔 |
#---------------------------以上省略--------------------------- <!-- A "Connector" using the shared thread pool--> <!-- <Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1" #原本預設為8080 port="80" protocol="HTTP/1.1" #修改後變80 connectionTimeout="20000" redirectPort="8443" /> --> <!-- Define a SSL HTTP/1.1 Connector on port 8443 #---------------------------以下省略--------------------------- |
沒有留言:
張貼留言