Ms7 Search
Google 搜尋 翻譯
calendar
« 四月 2025 »
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        
近期文章
文章分類
網站連結
Syndicate

« | »

tomcat 的安裝 與 apache 整合

2008-03-18 @ 14:49 in Linux

沒玩過 java 要裝 tomcat 實在有點...,因為有人要用 jsp ,所以只好試試看

  1. 20080318/14:10:00
  2. 環境 fedora 7 ,apache 2.2.4
  3. 下載 jdk-6u5-linux-i586-rpm.bin , apache-tomcat-6.0.16.tar.gz
  4. 執行 chmod 755 jdk-6u5-linux-i586-rpm.bin,執行 ./jdk-6u5-linux-i586-rpm.bin
  5. 設置環境變量,在 /etc/profile中加入如下內容:
    JAVA_HOME=/usr/java/jdk1.6.0_01
    CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib
    PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin
    export PATH CLASSPATH JAVA_HOME
  6. java -version 顯示  jdk 版本正確
  7. tar -zxvf apache-tomcat-6.0.16.tar.gz
  8. cp -R apache-tomcat-6.0.10 /usr/local/tomcat
  9. /usr/local/tomcat/bin/startup.sh //啟動tomcat
  10. 使用瀏覽器訪問 http://localhost:8080,出現tomcat默認頁面,說明已經安裝成功。
  11. 下面設定 tomcat 與 apache 的整合,設定很奇怪,在 ms7 可以用,在 nat 不能用,兩台主機的環境幾乎一樣,再研究,方法如下
  12. 下載 jakarta-tomcat-connectors-jk2-2.0.4-src.tar.gz,編譯產生 mod_jk2.so ,將它放在  modules/mod_jk2.so 下,方法上網找一下,忘記了
  13. 在 /etc/httpd/conf.d/ 下建立 mod_jk2.conf ,內容如下:
    LoadModule jk2_module modules/mod_jk2.so
    JkSet   config.file   /etc/httpd/conf.d/workers2.properties
    DirectoryIndex index.jsp
  14. 建立 /etc/httpd/conf.d/workers.properties 內容如下:
    [logger.apache2]
    level=DEBUG

    # Shared memory handling. Needs to be set.
    [shm]
    file=/var/apache/logs/shm.file
    size=1048576

    # Example socket channel, explicitly set port and host.
    [channel.socket:localhost:8009]
    tomcatId=localhost:8009
    port=8009
    host=127.0.0.1

    # define the worker
    [ajp13:localhost:8009]
    channel=channel.socket:localhost:8009

    [status:status]

    # Uri mapping

    [uri:/jkstatus/*]
    group=status:status

    [uri:/*.jsp]
    group=ajp13:localhost:8009

    [uri:/servlets-examples/*]
    group=ajp13:localhost:8009
  15. 在 /usr/local/tomcat/conf/server.xml 的 <Host .... > ... <Context path="" docBase="/var/www/html" debug="0" reloadable="true" crossContext="true"/> .....</Host> 加入紅色部分
  16. 重新啟動 apache , tomcat
  17. 結果在 ms7 的主機可以成功,將檔案 hello.jsp 放在ms7的 /var/www/html 下可以用,可是同樣的方法在 nat 下卻顯示找不到檔案,不知問題在那裡,再研究
  18. 記得差別只是在nat沒有將 jpackage-utils-1.7.3-1jpp.3.fc7移走,再研究看看
  19. 20080319/08:45:00 在測試時發現,只有 *.jsp 可以,而 servlets 就無法正常,而變通方式是將 15項紅字取消,將tomcat 的根目錄回到 tomcat 的原始根目錄,用 http://ip:8080 聯結就可以,只是這樣不知,html檔是用 apache 還是 tomcat 處理,等主機有空,再來試試
  20. 20080320 08:00:00 測試結果,好像在 :8080 就用 tomcat 在 :80就用 apache ,跟我想的一樣,原則上就這樣,先不整合,等那天想要將 servlets 是如何運作弄清楚,再來玩

迴響

tomcat 的安裝 與 apache 整合 | 豬窩

Free games: Gone are the days when you needed to pay
cash to become recruited into online sites. For many people who
try to become the greatest in terms of the current Online game computer game they're participating
in, next development of the child characteristics that you'll need to choose if you
strike the higher amounts. Usually many gamblers lose a
lot since they are not able to distribute their set budget.

作者 https://maar.thewritten.info @ 18:08, 2019-04-17

tomcat 的安裝 與 apache 整合 | 豬窩

If you want something changed, cropped differently, or even in any way altered, you've got somebody
that will do this for you personally (sometimes included at no extra cost).
He began following conservative school of painting in the
first place, which later took a totally different course.
The better the standard, the larger the ratio of pure pigment to its oil and wax
binder.

作者 anchortext @ 09:41, 2019-04-22

tomcat 的安裝 與 apache 整合 | 豬窩

Now if you are wondering it would indeed be tough and expensive job
to have their subscription, you then each is mistaken my friends.
On a recent Friday afternoon, about 25 minutes before candle-lighting, the telephone rang with a request for Rachel Katz.
It sounds type of silly in case you consider, those sounds are higher than what
many singers have in their range, but a majority of individuals are able to do it and without even trying
really.

作者 caz.justtry.fun @ 11:05, 2019-04-22

tomcat 的安裝 與 apache 整合 | 豬窩

They are not new txt messaging acronyms - these are actually acronyms
for gaming which article will probably familiarizes you with many of the more common forms.
It is extremely latest internet betting, that's receiving a lot
of popularity among youngsters all walks of life, the younger generation and
older people. On the opposite hand, Queensland has additionally shown a huge lifetime of
spending in previous years.

作者 Craftteacherstraining.com @ 04:12, 2019-05-05

tomcat 的安裝 與 apache 整合 | 豬窩

Maybe you cannot be a famous director; you can still direct a movie to memorize your life.
Excellent teachers are in demand and usually curently have a lot of students.

These tattoos can provide the wow factor when joined with a sexy set of two heel bone shoes.

作者 ckcp.leggo.today @ 02:49, 2019-05-07
發表迴響
 authimage