Changes between Version 5 and Version 6 of waue/2009/0806


Ignore:
Timestamp:
Aug 6, 2009, 3:13:39 PM (15 years ago)
Author:
waue
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • waue/2009/0806

    v5 v6  
    99 = 一、安裝 =
    1010 == 1.1 安裝 ==
    11  * 大部分的使用者都不建議用apt-get 安裝tomcat 因此建議用tarball方式解壓縮
    12  * 下載 [http://ftp.twaren.net/Unix/Web/apache/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz tomcat 6.0.20 2009/08/06]
    13  * 安裝
     11 * 注意:
     12
     13大部分的使用者都不建議用apt-get 安裝tomcat 因此建議用tarball方式解壓縮
     14
     15 * 下載:
     16[http://ftp.twaren.net/Unix/Web/apache/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz tomcat 6.0.20 2009/08/06]
     17
     18 * 安裝:
     19
    1420{{{
    1521sudo mv ~/Desktop/apache-tomcat-6*.gz /opt/
     
    2127
    2228 == 1.2 bootstrap ==
     29
     30若要系統開機就載入tomcat
    2331
    2432{{{
     
    3644 == 1.3 啟動停止tomcat ==
    3745
    38  * 建立 /etc/init.d/tomcat ,內容為:
     46建立 /etc/init.d/tomcat ,內容為:
     47
    3948{{{
    4049#!text
     
    6675esac
    6776}}}
    68  *
     77 * 使用方法:
     78   * 開啟 /etc/init.d/tomcat start
     79   * 關閉 /etc/init.d/tomcat stop
    6980
    70  = 二、 =
     81 = 二、 Hello World =
     82
     83 == 2.1 撰寫 hello.jsp ==
     84
     85{{{
     86cd /opt/tomcat/webapps/ROOT/
     87mkdir test
     88cd test
     89touch hello.jsp
     90chmod 755 hello.jsp
     91}}}
     92
     93hello.jsp 的內容為
     94{{{
     95#!text
     96
     97<html>
     98<head>
     99<title>
     100Hello World
     101</title>
     102</head>
     103 
     104<body>
     105<% String s = "Eric"; %>
     106<h1>Hello <%=s%></h1>
     107</body>
     108</html>
     109}}}
     110
     111{{{
     112/etc/init.d/tomcat restart
     113}}}
     114
     115 * 瀏覽: http:localhost:8080/test/hello.jsp