组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Marco Ferretti
liferay.home if liferay is deployed in standard tomcat in ubuntu
2011年6月8日 上午9:01
答复

Marco Ferretti

等级: Junior Member

帖子: 62

加入日期: 2010年10月4日

最近的帖子

Hi all,

in my quest for the most suitable installation for my servers, I am now trying to deploy liferay 6 into a standard tomcat6 that comes with ubuntu server.
Ideally liferay.home shall be in /home/liferay ( /home folder is mirrored on my server ) but I can't seem to make my liferay installation understand this.

I have downloaded liferay-portal-6.0.6-20110225.war , fixed ROOT.xml in /etc/tomcat6/Catalina/localhost, copied all the jar in <liferay_tomcat_bundle>/lib/ext into /usr/share/tomcat6/lib/ext, fixed catalina.properties , unzipped the war into webapps/ROOT, created a portal-ext.properties in webapps/ROOT/WEB-INF/classes and fired up liferay.

I thought that would have been it but I noticed from the errors that either liferay was not reading my portal-ext or I couldn't override liferay.home properties.
in order to make a quick and dirty test, I created data and deploy into /home/liferay and sym-linked them in /var/lib, restarted tomcat and this time liferay came up .
I tried to place portal-ext.properties in commons/classes, /var/lib and /usr/share but that didn't work either ( I am sure of this because I set up the database connection with PostgreSQL while Liferay's using HSQL ) .

What am I doing wrong ?

TIA

Marco
Marco Ferretti
RE: liferay.home if liferay is deployed in standard tomcat in ubuntu
2011年6月9日 上午6:30
答复

Marco Ferretti

等级: Junior Member

帖子: 62

加入日期: 2010年10月4日

最近的帖子

Digging into the Liferay code I found that, in case liferay is deployed into tomcat, the default liferay.home is set into SystemProperties.get("catalina.base") + "/.." which, in a standard Ubuntu/Debian installation, is in /var/lib ;
The next step is to read the portal configuration which means calling ConfigurationImpl with the current classloader ; this class, if multiple configurations is turned off, "simply" returns the configuration written in portal.properties ( PropsFiles.PORTAL + Conventions.PROPERTIES_EXTENSION ).

At this point I am lost : how is the portal-ext.properties loaded ? I mean, I cannot find any reference to include-and-override property in the portal sources ...


TIA

Marco
Aldo De Vleeschauwer
RE: liferay.home if liferay is deployed in standard tomcat in ubuntu
2012年11月18日 上午10:54
答复

Aldo De Vleeschauwer

等级: New Member

帖子: 20

加入日期: 2011年3月9日

最近的帖子

I was also looking into this recently.

Check EasyConf which is used by the portal. See ClassLoaderComponentConfiguration.java.
Johnathan Burbea
RE: liferay.home if liferay is deployed in standard tomcat in ubuntu
2012年11月18日 下午5:59
答复

Johnathan Burbea

等级: Junior Member

帖子: 39

加入日期: 2012年4月5日

最近的帖子

Check out this thread:
http://www.liferay.com/community/forums/-/message_boards/message/17957389

To get total control of the liferay.home you have to declare your portal-ext.properties in the WEB-INF/classes of the ROOT app in tomcat.

My examples in WebSphere; but you can achieve the same results. Look at my portal-ext.properties:


#liferay.home=/wsapps/sdl/liferay_home/
liferay.home=/opt/liferay_home_appsrv01
resource.repositories.root=${liferay.home}/liferay
auto.deploy.websphere.dest.dir=${liferay.home}/wsadmin-deploy
auto.deploy.websphere.wsadmin.app.manager.query=
#WO1061762
portal.ctx=/lportal
#cluster.link.enabled=true
#jdbc.default.jndi.name=jdbc/LiferayPool
ehcache.portal.cache.manager.jmx.enabled=false
#portal.instance.http.port=16430
#web.server.http.port=16458
#web.server.https.port=443
#web.server.host=lportal01.openfeed.com
#web.server.protocol=http
#web.server.display.node=true

#siteminder.auth.enabled=true
#siteminder.user.header=SM_USER
#company.security.auth.type=screenName
#auto.login.hooks=com.liferay.portal.security.auth.SiteMinderAutoLogin
#logout.events.post=com.liferay.portal.events.SiteMinderLogoutAction
#session.enable.url.with.session.id=false
Aldo De Vleeschauwer
RE: liferay.home if liferay is deployed in standard tomcat in ubuntu
2012年11月19日 上午6:45
答复

Aldo De Vleeschauwer

等级: New Member

帖子: 20

加入日期: 2011年3月9日

最近的帖子

If you prefer to keep these settings out of WEB-INF/classes as much as possible:

WEB-INF/classes/portal-ext.properties
liferay.home=/opt/portal/home
include-and-override=/opt/portal/home/portal-ext.properties

Then put all the other stuff in /opt/portal/home/portal-ext.properties