會員註冊 / 登入  |  電腦版  |  Jump to bottom of page

Web/Application Server » Re:Apache 2.2 + SSL + JK 1.2 + Tomcat 6.0 Clustering Auto Installer for CentOS 5.3

發表人: k.irfee, 十級學員
2010-12-09 19:40:58
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, 七段學員
2010-12-10 00:40:10
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
描述 demo.war for deploy to Tomcat test
檔案大小 1 Kbytes
下載次數 4 次
[Disk] 下載


發表人: caramel, 十級學員
2011-03-09 11:34:53
您好:

我照這篇文章去作了設定

worker1 worker2 與 httpd 都能正常start

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

打http://localhost/clustertest.jsp

出現 Service Temporarily Unavailable

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

希望大大的幫忙

發表人: andowson, 七段學員
2011-03-09 15:55:54
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

發表人: caramel, 十級學員
2011-03-09 20:53:57
我發現原因了

好像是SELinux在搞鬼

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

發表人: andowson, 七段學員
2011-03-10 18:38:46
我已經把第一篇文章中的注意事項標註為紅色了
disable SELinux and firewall

發表人: kevinwang72326, 十級學員
2011-06-07 18:10:46
你好:

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


發表人: andowson, 七段學員
2011-06-09 16:53:40
kevinwang72326您好:
您可以自己試試看,如果有遇到問題,再把您的做法發表上來,讓大家討論。




會員註冊 / 登入  |  電腦版  |  Jump to top of page