Re: FW: tomcat7 in chroot environment

2015-04-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Andrea,

On 4/29/15 4:14 PM, Andrea Freire wrote:
> excuse me I have a little problem with the tomcat7 installation.
> The tomcat7 install with apt-get for a opengeosuite-server
> installer in a chroot with ubuntu environment, the problem is when
> I want to start the service in the chroot console it throws me a
> message:
> 
> * tomcat7 is not installed
> 
> I change the /var/lib/tomcat7 an /usr/share/tomcat7 folders owner
> to tomcat7 because there was with root as owner in the folders in
> the chroot environment in the past this resolve the problem in a
> tipical installing and change the CATALINA_BASE an CATALINA_HOME in
> the start script in the /etc/init.d/tomcat7 with the folders in the
> chroot environment.
> 
> In the beginning the message when I execute the command service
> tomcat7 start doesn't throws me nothing, all was normal but I can´t
> see the web page or the service running from another machine. I see
> that the link to the folder /var/lib/tomcat7 in the chroot
> environment doesn´t go to a file inside the chroot I change that to
> the ubication inside the chroot then began with the problem.

What you have to understand about chroot is that 100% of what you need
to launch your process needs to be available *inside* the chroot'd
environment.

So, if you need to chroot to /var/tomcat/chroot, then you are going to
need a directory at /var/tomcat/chroot/var/lib/tomcat7 containing
whatever files you expected to be there.

Have you had Tomcat working in a chroot'd environment in the past?
I've had a nightmare of a time trying to get a JVM to launch within a
chroot'd environment because it needs to many support libraries, etc.
available just to start. Once the JVM can launch within the chroot'd
environment, getting Tomcat to work should be trivial: just move
everything Tomcat needs into the chroot root-dir (likely a
subdirectory of this, actually) and you should be fine.

As for launching Tomcat within the chroot'd environment from a service
script, your service script needs to execute the "chroot" command and
then give a command to run once the chroot() system call has
completed. Presumably, that command will be
"/path/to/tomcat/bin/catalina.sh start". The /path/to/tomcat should be
relative to the chroot's root, and both CATALINA_BASE and
CATALINA_HOME should also be relative to the chroot's root directory.

Hope that helps,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVQUDZAAoJEBzwKT+lPKRYBKEP+wZWznBPfG4fFuMFd0P55AHm
ecSgmOeAqxQLFzvZpQdA2nr8QUBLSU+rcjvaFw6H+5lP1BR/2iJl3IxBiof5xBkp
YFsdII/0E4n9Nq1wgntKU3KdywbxAtKuDdjMbD1mxqUttdT2RjpclNubZLMZek5o
Wdh/6Bx/mnPhEQE08dTupsQ4xBXNL4KKc3yNHkNSewiFqQZxvMxPCXd1hf+kCRVk
uN9QBzr5mCEazNk1wr4fZLGaNVur1YaKHOYDuDN4+KbzvCwrblYnWbbg+ScWDl5T
2P1khdJL7/w8CBmRXK+c8mCC/PbtkLvZMqD2UV8+6zUWYyWAkBy1p3yilxxDVcNL
7G05Fqpj6RnnDFzZvjpdcDILPQOirL89YyDKGHs6oh0G2ShOWxUYc6wX4seODTt9
K4icj9lz/msmnM2bQEI1OdQ5oMOTg+LGys+RnVAIX/S6hXQEj4JMUUUiSWQKxeHg
5ql8ZW/6kXeFDIs5TwTAbHRSCcP3ff89C/nPgLnQ1myk4O2rqfHt7RNUm3slFBQI
668bUS0bRX1pXGAaxq0GERkehsTAb4EIuZG2xU8iG1ZxK/YZJsIdXumTZUUR0M6K
5voG1VJ3s+pCit6xbPxHKvT4OZzITPWE5j8cmlEUp0b/1wt0HBx2bM7NggpJBGnj
o+NhNGWEKxIYvZOh+SM4
=Ga4k
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



FW: tomcat7 in chroot environment

2015-04-29 Thread Andrea Freire


Avanzando es la unica forma de dejar atras lo que no necesitamos. Andrea 

From: solange_...@hotmail.com
To: users@tomcat.apache.org
Subject: tomcat7 in chroot environment
Date: Wed, 29 Apr 2015 15:09:07 -0500




Hi,

excuse me I have a little problem with the tomcat7 installation. The 
tomcat7 install with apt-get for a opengeosuite-server installer in a 
chroot with ubuntu environment, the problem is when I want to start the 
service in the chroot console it throws me a message:

* tomcat7 is not installed

I change the /var/lib/tomcat7 an /usr/share/tomcat7 folders owner to 
tomcat7 because there was with root as owner in the folders in the 
chroot environment in the past this resolve the problem in a tipical 
installing and change the CATALINA_BASE an CATALINA_HOME in the start 
script in the /etc/init.d/tomcat7 with the folders in the chroot 
environment.

In the beginning the message when I execute the command service tomcat7 
start doesn't throws me nothing, all was normal but I can´t see the web 
page or the service running from another machine. I see that the link to 
the folder /var/lib/tomcat7 in the chroot environment doesn´t go to a 
file inside the chroot I change that to the ubication inside the chroot 
then began with the problem.

Regards,

Andrea Freire 

Avanzando es la unica forma de dejar atras lo que no necesitamos. Andrea