2014-10-20 18 views
0

財產需要重寫Liferay的在Tomcat集羣環境portal-ext.properties這樣兩個雄貓分別有重寫Liferay的「autodeploy.enabled」在Tomcat集羣環境

autodeploy.enabled=true and 
autodeploy.enabled=false 

。我曾跟隨下面的鏈接覆蓋portal-ext.properties -

Liferay: How to configure Liferay Portal

但是這裏的問題是,Liferay的家是常見到Tomcat的且二者共享同一個portal-ext.properties並且更改autodeploy.enabled = true會覆蓋Tomcat的autodeploy屬性。此外,webapp位置是NAS掛載的,並且都共享相同的webapp位置。

我需要做什麼才能使兩個Tomcats的autodeploy.enabled屬性不同?

回答

0

閱讀tomcat文檔後得到了解決方案。

  1. 創建例如兩個文件夾 - 「portalProperties1」和「portalProperties2」,這是由雄貓,並且拷貝這兩個文件夾portal-ext.properties都可以訪問。
  2. 轉到第一個Tomcat的位置 - {liferay_home}/tomcat/conf並打開文件catalina.properties。
  3. 搜索屬性 - common.loader,並在/ home/flex是文件夾portalProperties1的絕對路徑的末尾添加一個以逗號分隔的值 -/home/flex/portalProperties1,並且將相應地進行更改。
  4. 對其他tomcat實例也一樣,但用portalProperties2替換portalProperties1。
  5. 打開portalProperties1/portal-ext.properties並更改屬性 - auto.deploy.enabled = false。 只爲這個tomcat做。
  6. 重新啓動這兩個雄貓。

就是這樣,現在只有一個tomcat會自動部署,不會引發異常。

0

我認爲這裏的一個簡單解決方案是將autodeploy.enabled = true和autodeploy.enabled = false放入ROOT Web應用程序內的portal-ext.properties中。 如果你還沒有,你可以創建一個portal-ext.properties文件,並把它放在文件夾/ tomcat/webapps/ROOT/WEB-INF/classes/

你需要確定你不需要' t在liferay根文件夾的portal-ext.properties中具有值autodeploy.enabled = true或false。

Liferay檢查兩個位置的portal-ext.properties。

這是您可以將所有常見的portal-ext.properties值保存在一個文件中。

+0

這裏的問題是webapps文件夾是NAS掛載的,兩個Tomcat都有相同的webapps文件夾。所以只有一個portal-ext.properties文件,如果你把它放在兩個tomcat中共享的ROOT文件夾中。 – 2014-10-22 13:41:06