Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Sebastian Singer
Liferay and existing Tomcat: who is user, which userID?
March 8, 2012 12:18 AM
Answer

Sebastian Singer

Rank: New Member

Posts: 6

Join Date: March 7, 2012

Recent Posts

Hi,

I am trying to get liferay 6.1 running on an existing Tomcat 7.0.24. OS is Gentoo Linux, Kernel 3.1.
I am a bit confused concerning what the User Guide on liferay.com tells about that LIFERAY_HOME dir and a user with a userID running Liferay.

Who is this user?
Is it "tomcat:tomcat" as server user? Or do I have to create a special liferay user "lportal" at OS level ? Or is it the liferay admin account?

And which directory "liferay" is created where if I do not choose to put the complete tomcat underneath a LIFERAY_HOME directory?
Is it "liferay" in TOMCAT_HOME? Or /home/lportal/liferay for user "lportal" in the OS? Where is the home directory of liferay admin?

I would like to get liferay runnig using the existing tomcat in Gentoo Linux "as is" ("# emerge tomcat") and not have to place a selfcompiled tomcat in a liferay subdirectory. I want to deploy other applications later (Alfresco, Pentaho and Funambol). That's why I want to stick to the existing tomcat as Gentoo Linux provides it. I don't want to change this standard procedure.

Any held kindly appreciated.

Regards,
Sebastian
Ravi Kumar Gupta
RE: Liferay and existing Tomcat: who is user, which userID?
March 8, 2012 1:31 AM
Answer

Ravi Kumar Gupta

Rank: Liferay Legend

Posts: 1265

Join Date: June 23, 2009

Recent Posts

First, If you have never seen how liferay runs, go for a bundled one first and be familiar with the terms.

For your question. The user id they are talking about is server user.

Next Liferay home as described will be--
liferay_home/
liferay_home/deploy
liferay_home/tomcat
liferay_home/data
Sebastian Singer
RE: Liferay and existing Tomcat: who is user, which userID?
March 8, 2012 2:18 AM
Answer

Sebastian Singer

Rank: New Member

Posts: 6

Join Date: March 7, 2012

Recent Posts

O.K. maybe I was not specific enough. I have been using liferay as a bundle for a while. That's why installation was not such a problem.

In the bundled version tomcat is located in a subdirectory of $LIFERAY_HOME. Because I intend to use other java applications besides liferay on the same server I want to use a standard tomcat server as provided by the OS. In the user guide it says:

If Liferay is unable to create the resources it needs in this folder, or if it finds itself running on certain application servers, it creates a folder called liferay in the home folder of the user ID that is running Liferay, and that becomes Liferay Home.


Is it possible to deploy liferay as an application of a standard tomcat server or do I always have to set tomcat in a subdirectory of $LIFERAY_HOME? And if I can use a standard tomcat: where do I put $LIFERAY_HOME then?

And if I can use a standard tomcat, and if I can set a $LIFERAY_HOME directory NOT as the upper directory of $TOMCAT_HOME: whom do I chown this $LFERAY_HOME directory to?

Regards,
Sebastian
Ravi Kumar Gupta
RE: Liferay and existing Tomcat: who is user, which userID?
March 8, 2012 2:30 AM
Answer

Ravi Kumar Gupta

Rank: Liferay Legend

Posts: 1265

Join Date: June 23, 2009

Recent Posts

lets keep your existing tomcat suppose at /home/abcuser/installed/mydir/tomcat

now if you are going to install liferay on this tomcat. /mydir/ will be acting as liferay home. When you will run liferay using abcuser then it will create data and deploy folders. In this case all directories are owned by abcuser and so no need to run chown.

But if tomcat was placed in some other directory and is tried to run using abcuser. Provided abcuser has no permission to write in that particular directory then Liferay will create data and deploy directories automatically in home of abcuser which is /home/abcuser..

HTH
Sebastian Singer
RE: Liferay and existing Tomcat: who is user, which userID?
March 8, 2012 4:24 AM
Answer

Sebastian Singer

Rank: New Member

Posts: 6

Join Date: March 7, 2012

Recent Posts

Thanks Ravi,

maybe I still haven't completely understood the architecture of Liferay. Liferay is run via Tomcat. So the liferay server user is tomcat:tomcat. Tomcat home is $CATALINA_HOME which is /usr/share/tomcat in Gentoo. So the next level up directory is /usr/share which should be owned by the liferay user. Well, I won't ever allow any user besides root to own this directory. Still: why is there a war file if the bundles are more useful? How do others deploy war files of liferay without sacrificing their standard installation of tomcat?

Never mind, it must be my lack of understanding. So it seems like it's best to stick with the bundled version.

Thanks again,
Sebastian
Hitoshi Ozawa
RE: Liferay and existing Tomcat: who is user, which userID?
March 8, 2012 5:51 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7952

Join Date: March 23, 2010

Recent Posts

Have you heard of symbolic link to a directory?
Sebastian Singer
RE: Liferay and existing Tomcat: who is user, which userID?
March 15, 2012 12:18 AM
Answer

Sebastian Singer

Rank: New Member

Posts: 6

Join Date: March 7, 2012

Recent Posts

I had symlinked all directories of Gentoo-Tomcat to mimic Standard-Tomcat directory tree indeed. Didn't improve.

In the end I switched to a new standard tomcat installation at /opt/apache-tomcat and deployed liferay there. Changed from MySQL to PostgreSQL because of some error messages still coming up. Had to deal with some minor tweaks. But now here we are: a brand new and functional lferay installation.
By the way: I use apache2 as a proxy to tomcat via mod_ajp. In this context the apache2 version distributed by Gentoo Linux does a good job. At least somthing ;-)

I am quite content, only wondering about the incompatibilities between older and new versions. Especially mail-portlet and chat-portlet do not deploy due to version number 6.0.x on a 6.1 platform. But I will just wait till those portelts come as with version 6.1

Regards,
Sebastian