寫 jsp 程式至少也要懂得架設 Tomcat Server,架設步驟如下:

首先必須先下載 Tomcat,官網下載 Tomcat 軟體:http://tomcat.apache.org/

目前最新版本為 apache-tomcat-6.0.26.tar.gz

http://ftp.nsysu.edu.tw/Apache/tomcat/tomcat-6/v6.0.26/bin/apache-tomcat-6.0.26.tar.gz

 

setup one:

[user@Fedora9 ~]#su - root   //以 root 身分執行

[root@Fedora9 ~]#

 

setup two:

[root@Fedora9 ~]#cd /home/user/download/   //切換到所下載之目錄

[root@Fedora9 download]#tar zxvf apache-tomcat-6.0.26.tar.gz   //解壓縮

 

setup three:

[root@Fedora9 download]#cd ./apache-tomcat-6.0.26/bin   //切換到已解壓縮目錄

 

setup four:

[root@Fedora9 bin]#sh startup.sh
Using CATALINA_BASE:   /apache-tomcat-6.0.26
Using CATALINA_HOME:   /apache-tomcat-6.0.26
Using CATALINA_TMPDIR: /apache-tomcat-6.0.26/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /apache-tomcat-6.0.26/bin/bootstrap.jar

 

setup five:在瀏覽器 url 輸入 http://localhost:8080 or http://IP:8080 or http://Domain:8080

Tomcat server

 

如果想讓 tomcat 伺服器在系統啟動時自動的執行,就必須在 /etc/rc.local 內加入相關執行即可。

setup six:

[root@Fedora9 ~]#nano /etc/rc.local   //內容如下

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
sh /apache-tomcat-6.0.26/bin/startup.sh   //加入這行

存檔後,在下次啟動系統時,Tomcat 也會跟著被自動執行啟動。

    文章標籤

    Fedora 9

    全站熱搜

    mitblog 發表在 痞客邦 留言(0) 人氣()