LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > LiteSpeed chroot setup

Reply
 
Thread Tools Display Modes
  #1  
Old 12-05-2005, 11:39 AM
zoom zoom is offline
Senior Member
 
Join Date: Nov 2005
Posts: 92
Default LiteSpeed chroot setup

During the installation of the pro version I requested "chroot" to be setup. The installation requests the path of the chroot'd environment to be absolute and it must include the server install path as well. I've setup a chroot directory /chroot with /opt/lsws under it as well. However, when I enter my absolute path of /chroot it keeps prompting me again and again. I didn't see anything in the documentation about chroot setup for LiteSpeed, could someone give me some guidance?? please???

Thanks in advance.
Reply With Quote
  #2  
Old 12-05-2005, 12:17 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
The LSWS must be installed and run inside the chroot jail. I guess you should do as follow:

# mkdir -p /chroot/opt/lsws

# ./install.sh

....

server root: /chroot/opt/lsws
chroot path: /chroot
Reply With Quote
  #3  
Old 12-05-2005, 01:54 PM
zoom zoom is offline
Senior Member
 
Join Date: Nov 2005
Posts: 92
Thanks mistwang,
I was able to get it installed correctly into the chroot'd directory. Having some problems getting it to execute the lsphp fastcgi binary. I checked to see what shared libs it might be using and put those into the chroot'd area as well, still no luck. Does it require some additional libs???


ldd lsphp reports the following libs are needed by lsphp.

Quote:
libcrypt.so.1 => /lib/libcrypt.so.1 (0x40026000)
libresolv.so.2 => /lib/libresolv.so.2 (0x40053000)
libm.so.6 => /lib/tls/libm.so.6 (0x40065000)
libdl.so.2 => /lib/libdl.so.2 (0x40088000)
libnsl.so.1 => /lib/libnsl.so.1 (0x4008c000)
libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Error in the stderr.log:

Code:
lsphp: error while loading shared libraries: libresolv.so.2: cannot open shared object file: No such file or directory
Reply With Quote
  #4  
Old 12-05-2005, 02:15 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
please run "lsws/admin/misc/chroot.sh /chroot/ /chroot/opt/lsws/fcgi-bin/lsphp", should fix the missing library for you. or you can do "cp /lib/libresolv.so.2 /chroot/lib/".
Reply With Quote
  #5  
Old 12-06-2005, 07:22 AM
zoom zoom is offline
Senior Member
 
Join Date: Nov 2005
Posts: 92
That did the trick. PHP seems to work perfectly now in the chroot'd environment.

I do have one general question to ask though. If I wish to run in a chroot'd environment I assume that would require me to run any additional services within the chroot'd environment ie: MySQL, Perl, Python or Ruby correct??

Thanks again mistwang for all your help. Much Appreciated.
Reply With Quote
  #6  
Old 12-06-2005, 02:29 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
You are welcome. :-)

For Perl, Python or Ruby, you have to copy all related executable and binary into the jail,
For MySQL, you can run it either inside or outside the jail, you can point the MySQL server socket to a path inside the jail like /chroot/tmp/mysql.sock, for applications inside the jail, they can access mysql via socket /tmp/mysql.sock, or, just use the TCP server socket 127.0.0.1:3306.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setup for Rails via Litespeed Ruby LSAPI Justin Ruby/Rails 2 12-08-2007 07:19 PM
Trying to use litespeed load balancer for balancing lsapi technix Ruby/Rails 3 07-06-2007 08:28 PM
Problem running Gallery under LiteSpeed kchrist PHP 4 10-01-2006 02:53 PM
Problem installing LiteSpeed 2.2.1 Standard on UNIX perezsy Install/Configuration 17 09-22-2006 09:53 AM
Best configuration for PHP LiteSpeed SAPI jeff Install/Configuration 6 10-19-2005 09:54 AM


All times are GMT -7. The time now is 12:32 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.