Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Marco Ferretti
liferay.home if liferay is deployed in standard tomcat in ubuntu
June 8, 2011 9:01 AM
Answer

Marco Ferretti

Rank: Junior Member

Posts: 73

Join Date: October 4, 2010

Recent Posts

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
June 9, 2011 6:30 AM
Answer

Marco Ferretti

Rank: Junior Member

Posts: 73

Join Date: October 4, 2010

Recent Posts

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
November 18, 2012 10:54 AM
Answer

Aldo De Vleeschauwer

Rank: Junior Member

Posts: 25

Join Date: March 9, 2011

Recent Posts

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
November 18, 2012 5:59 PM
Answer

Johnathan Burbea

Rank: Junior Member

Posts: 39

Join Date: April 5, 2012

Recent Posts

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
November 19, 2012 6:45 AM
Answer

Aldo De Vleeschauwer

Rank: Junior Member

Posts: 25

Join Date: March 9, 2011

Recent Posts

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