練功房推薦書單

  • 猛虎出柙雙劍合璧版--最新 OCA / OCP Java SE 7 Programmer 專業認證 (電子書)
  • 流浪教師存零股存到3000萬(全新增修版)(書+DVD)
  • 開始在關西自助旅行(京都‧大阪‧神戶‧奈良)(全新增訂版)
  • 不敗教主的300張股票存股術

Apache 2.2 + SSL + JK 1.2 + Tomcat 6.0 Clustering Auto Installer for CentOS 5.3 RSS feed
討論區首頁 » Web/Application Server
發表人 內容
k.irfee

十級學員

註冊時間: 2010/12/6
文章: 2
離線
I have tried your given suggestion , but my tomcat doesn't start. I have added host element in server.xml of both workers. also created /var/webapps/domainname directory.

even I can't see anything in catalina.out it is blank.

new virtualhost part from server.xml


<Host name="mycomp.khan.com" appBase=""
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="mycomp.khan.com_access_log." suffix=".txt"
pattern="combined" resolveHosts="false"/>
<Context path="" docBase="webapps/mycomp.khan.com" reloadable="false" />




I need to use webapp folder as default setup. like, in a default tomcat setup we just need to copy application war file and then it will get unpacked by tomcat . same way it can have multiple application war file deployed.

please help!

andowson

七段學員
[Avatar]

註冊時間: 2007/1/2
文章: 710
來自: 台北
離線
Dear k.irfee,
I have tried to deploy a demo.war in my host. It's very easy to do so. Just use the Tomcat's manager application. And if you followed my setup script, the Tomcat manager application should have already been installed. All you need to do is to find out the manager's password(username is "manager").

Follow the steps and you should be successfully deploy the demo.war and see the output of "Hello, world!":
1.Check the file /var/robust/worker1/conf/tomcat-users.xml and you can see the username and password of the role "manager". (You can modify it to suit your own need.)
2.Open a browser, and go to the URL: http://<your_server_ip>/manager/html. Tomcat will ask you to enter the username and password, use the information from step 1.
3.Go to the "WAR file to deploy" section, and click the browse button at the "Select WAR file to upload" field, choose the demo.war and then click the Deploy button.
4.Click on the /demo link.

Note:
1.Check the file /var/robust/worker1/conf/server.host,
Your <Host> should look like the following example:

<Host name="192.168.1.1" appBase="webapps/192.168.1.1"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="192.168.1.1_access_log." suffix=".txt"
pattern="combined" resolveHosts="false"/>
<Context path="" docBase="" reloadable="false" />
</Host>

2.Check the permission of /var/webapps/<your_server_ip>, it should be writable by tomcat. Use the following command to fix it.
chown -R tomcat:tomcat /var/webapps/<your_server_ip>

Reference:
http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html
 檔案名稱 demo.war [Disk] 下載
 描述 demo.war for deploy to Tomcat test
 檔案大小 1 Kbytes
 下載次數:  4 次


分享經驗 累積智慧
[WWW]
caramel

十級學員

註冊時間: 2011/3/7
文章: 4
離線
您好:

我照這篇文章去作了設定

worker1 worker2 與 httpd 都能正常start

但是我打http://localhost/ 依舊是point到httpd自己的web

打http://localhost/clustertest.jsp

出現 Service Temporarily Unavailable

然後/var/webapps 裡的東西都無法access 不知道怎麼解決

希望大大的幫忙
andowson

七段學員
[Avatar]

註冊時間: 2007/1/2
文章: 710
來自: 台北
離線
caramel您好:
請先檢查一下您主機的IP,然後cd /var/webapps,檢查目錄下有沒有一個跟主機IP相同的目錄
例如主機IP是192.168.1.1,則目錄名稱應為192.168.1.1
請改為存取下列網址看看
http://192.168.1.1/
再不行請重新啟動一次Tomcat和Apache看看
利用下列指令去檢查Tomcat是否正常啟動
netstat -an|grep 8105

netstat -an|grep 8109

分享經驗 累積智慧
[WWW]
caramel

十級學員

註冊時間: 2011/3/7
文章: 4
離線
我發現原因了

好像是SELinux在搞鬼

我把他disable後就可以開啟了^^
andowson

七段學員
[Avatar]

註冊時間: 2007/1/2
文章: 710
來自: 台北
離線
我已經把第一篇文章中的注意事項標註為紅色了
disable SELinux and firewall

分享經驗 累積智慧
[WWW]
kevinwang72326

十級學員

註冊時間: 2011/6/7
文章: 1
離線
你好:

請教一下
我可以把session replication的功能給獨立出來嗎
意思是我只要實現這個功能

andowson

七段學員
[Avatar]

註冊時間: 2007/1/2
文章: 710
來自: 台北
離線
kevinwang72326您好:
您可以自己試試看,如果有遇到問題,再把您的做法發表上來,讓大家討論。

分享經驗 累積智慧
[WWW]
 
討論區首頁 » Web/Application Server
前往:   
行動版