留言板

liferay.home if liferay is deployed in standard tomcat in ubuntu

thumbnail
Marco Ferretti,修改在12 年前。

liferay.home if liferay is deployed in standard tomcat in ubuntu

Regular Member 帖子: 100 加入日期: 10-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
thumbnail
Marco Ferretti,修改在12 年前。

RE: liferay.home if liferay is deployed in standard tomcat in ubuntu

Regular Member 帖子: 100 加入日期: 10-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
thumbnail
Aldo De Vleeschauwer,修改在11 年前。

RE: liferay.home if liferay is deployed in standard tomcat in ubuntu

Junior Member 帖子: 35 加入日期: 11-3-9 最近的帖子
I was also looking into this recently.

Check EasyConf which is used by the portal. See ClassLoaderComponentConfiguration.java.
JB Burbea,修改在11 年前。

RE: liferay.home if liferay is deployed in standard tomcat in ubuntu

Junior Member 帖子: 37 加入日期: 12-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
thumbnail
Aldo De Vleeschauwer,修改在11 年前。

RE: liferay.home if liferay is deployed in standard tomcat in ubuntu

Junior Member 帖子: 35 加入日期: 11-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