Installing Zope under RedHat
Hi, I've been running Zope on my Win98 box just to try it out initially (less setup involved), but now I'm trying to install it on my Linux machine for better stability etc. I've successfully installed it, and it runs fine* when I start it manually, but I cannot get it to start on bootup: I've set up a script in /etc/rc.d/init.d/ and a link to it in /etc/rc.d/rc3.d/ (which is the correct runlevel), but although on bootup it says "Starting Zope.... [ OK ]", Zope actually doesn't launch. Unfortunately, I don't have the details of the script with me at the moment (I'll get them ASAP), but until then does anyone know any reasons that might be causing this? Is there anything in particular that has to be started before Zope? At present I'm trying to run it with ZServer on port 8080 (although Apache is running on the box on port 80). Thanks, Andrew *Except for a warning about Python 2.2.2 being too new, and one about running as "nobody"
Andrew, Good of you to notice this. I was surprised (a little) to see this too. A couple questions: Which linux are you using? When you cd to /etc/rc.d/init.d/ and run the script (say its name is zope) a la ./zope start what happens? Does it start up? Finally do a "grep ^si: /etc/inittab" and paste the output into your reply. ken Andrew Durdin at 22:08 (UTC+1100) on Thu, 12 Dec 2002 said: = Hi, = = I've been running Zope on my Win98 box just to try it out initially (less = setup involved), but now I'm trying to install it on my Linux machine for = better stability etc. I've successfully installed it, and it runs fine* when = I start it manually, but I cannot get it to start on bootup: I've set up a = script in /etc/rc.d/init.d/ and a link to it in /etc/rc.d/rc3.d/ (which is = the correct runlevel), but although on bootup it says "Starting Zope.... [ = OK ]", Zope actually doesn't launch. = Unfortunately, I don't have the details of the script with me at the moment = (I'll get them ASAP), but until then does anyone know any reasons that might = be causing this? Is there anything in particular that has to be started = before Zope? At present I'm trying to run it with ZServer on port 8080 = (although Apache is running on the box on port 80). = = Thanks, = = Andrew = = *Except for a warning about Python 2.2.2 being too new, and one about = running as "nobody" = = = _______________________________________________ = Zope maillist - Zope@zope.org = http://lists.zope.org/mailman/listinfo/zope = ** No cross posts or HTML encoding! ** = (Related lists - = http://lists.zope.org/mailman/listinfo/zope-announce = http://lists.zope.org/mailman/listinfo/zope-dev ) =
Thanks for the quick response, ken. ----- Original Message ----- From: "ken" <ken@cleveland.lug.net>
Which linux are you using?
I'm using RedHat 7.3.
When you cd to /etc/rc.d/init.d/ and run the script (say its name is zope) a la
/zope start
what happens? Does it start up?
Yes, when I do that (as root), zope starts with the following messages: ================================================================= [root@box init.d]# ./zope start Starting Zope: [root@box init.d]# /usr/local/zope/2.6.0/z2.py:385: UserWarning: Y ou are running Python version 2.2.2. This Python version has not yet been tested with Zope and you may experience operational problems as a result. Consider using Python 2.1.3 instead. warnings.warn(err) ------ 2002-12-13T07:34:04 INFO(0) zdaemon Started subprocess: pid 1375 /usr/local/zope/2.6.0/z2.py:385: UserWarning: You are running Python version 2.2.2 . This Python version has not yet been tested with Zope and you may experience op erational problems as a result. Consider using Python 2.1.3 instead. warnings.warn(err) ------ 2002-12-13T07:34:15 INFO(0) ZODB Opening database for mounting: '144707896_1036222 030.749935' ------ 2002-12-13T07:34:15 INFO(0) ZODB Mounted database '144707896_1036222030.749935' at /temp_folder ------ 2002-12-13T07:34:16 INFO(0) ZServer HTTP server started at Fri Dec 13 07:34:16 200 2 Hostname: box.lan Port: 8080 ------ 2002-12-13T07:34:16 INFO(0) ZServer FTP server started at Fri Dec 13 07:34:16 2002 Hostname: box.lan Port: 8021 ------ 2002-12-13T07:34:17 INFO(0) ZServer PCGI Server started at Fri Dec 13 07:34:17 200 2 Unix socket: /usr/local/zope/2.6.0/var/pcgi.soc ------ 2002-12-13T07:34:17 INFO(0) z2 Running Zope as 'nobody' can compromise your Zope f iles; consider using a dedicated user account for Zope =================================================================
Finally do a "grep ^si: /etc/inittab" and paste the output into your reply.
si::sysinit:/etc/rc.d/rc.sysinit The script I use for starting Zope is as follows: ======================================================================= #!/bin/sh # Startup script for Zope # # description: Run zope (web management) server # Source function library. . /etc/rc.d/init.d/functions prog="Zope" start() { echo -n $"Starting $prog: " /usr/local/zope/2.6.0/start -u nobody & RETVAL=$? return $RETVAL } stop() { /usr/local/zope/2.6.0/stop return 0 } case "$1" in start) start ;; stop) stop ;; status) status $prog ;; restart) stop start ;; condrestart) ;; *) echo $"Usage: $0 {start|stop|restart|status}" exit 1 esac exit 0 ======================================================================= In /etc/rc3.d, the link to the zope script is currently "S96zope" Andrew
Andrew Durdin at 22:08 (UTC+1100) on Thu, 12 Dec 2002 said:
= Hi, = = I've been running Zope on my Win98 box just to try it out initially (less = setup involved), but now I'm trying to install it on my Linux machine for = better stability etc. I've successfully installed it, and it runs fine* when = I start it manually, but I cannot get it to start on bootup: I've set up a = script in /etc/rc.d/init.d/ and a link to it in /etc/rc.d/rc3.d/ (which is = the correct runlevel), but although on bootup it says "Starting Zope.... [ = OK ]", Zope actually doesn't launch. = Unfortunately, I don't have the details of the script with me at the moment = (I'll get them ASAP), but until then does anyone know any reasons that might = be causing this? Is there anything in particular that has to be started = before Zope? At present I'm trying to run it with ZServer on port 8080 = (although Apache is running on the box on port 80). = = Thanks, = = Andrew = = *Except for a warning about Python 2.2.2 being too new, and one about = running as "nobody" = = = _______________________________________________ = Zope maillist - Zope@zope.org = http://lists.zope.org/mailman/listinfo/zope = ** No cross posts or HTML encoding! ** = (Related lists - = http://lists.zope.org/mailman/listinfo/zope-announce = http://lists.zope.org/mailman/listinfo/zope-dev ) =
Andrew, You did a pretty good job with the startup script. There's a few things here to deal with. But addressing your original request first: - run "grep ^id /etc/inittab" and show us what that gives you. - run "ls -l /etc/rc.d/rc?.d/*zope" and paste the output from that into your reply also. - run "grep zope /etc/passwd" and send us the output as well (if there is any). If you want to edit out from your reply the characters between the first and second colons (':'), you can do that. If this grep returns anything, it'll probably be just an 'x'. We're close to fixing this. Thanks, ken Andrew Durdin at 07:43 (UTC+1100) on Fri, 13 Dec 2002 said: = Thanks for the quick response, ken. = = ----- Original Message ----- = From: "ken" <ken@cleveland.lug.net> = > Which linux are you using? = = I'm using RedHat 7.3. = = > When you cd to /etc/rc.d/init.d/ and run the script (say its name is = > zope) a la = > = > /zope start = > = > what happens? Does it start up? = = Yes, when I do that (as root), zope starts with the following messages: = ================================================================= = [root@box init.d]# ./zope start = Starting Zope: [root@box init.d]# /usr/local/zope/2.6.0/z2.py:385: = UserWarning: Y = ou are running Python version 2.2.2. This Python version has not yet been = tested = with Zope and you may experience operational problems as a result. Consider = using = Python 2.1.3 instead. = warnings.warn(err) = ------ = 2002-12-13T07:34:04 INFO(0) zdaemon Started subprocess: pid 1375 = /usr/local/zope/2.6.0/z2.py:385: UserWarning: You are running Python version = 2.2.2 = . This Python version has not yet been tested with Zope and you may = experience op = erational problems as a result. Consider using Python 2.1.3 instead. = warnings.warn(err) = ------ = 2002-12-13T07:34:15 INFO(0) ZODB Opening database for mounting: = '144707896_1036222 = 030.749935' = ------ = 2002-12-13T07:34:15 INFO(0) ZODB Mounted database = '144707896_1036222030.749935' at = /temp_folder = ------ = 2002-12-13T07:34:16 INFO(0) ZServer HTTP server started at Fri Dec 13 = 07:34:16 200 = 2 = Hostname: box.lan = Port: 8080 = ------ = 2002-12-13T07:34:16 INFO(0) ZServer FTP server started at Fri Dec 13 = 07:34:16 2002 = Hostname: box.lan = Port: 8021 = ------ = 2002-12-13T07:34:17 INFO(0) ZServer PCGI Server started at Fri Dec 13 = 07:34:17 200 = 2 = Unix socket: /usr/local/zope/2.6.0/var/pcgi.soc = ------ = 2002-12-13T07:34:17 INFO(0) z2 Running Zope as 'nobody' can compromise your = Zope f = iles; consider using a dedicated user account for Zope = ================================================================= = = > Finally do a "grep ^si: /etc/inittab" and paste the output into your = > reply. = = si::sysinit:/etc/rc.d/rc.sysinit = = = The script I use for starting Zope is as follows: = ======================================================================= = #!/bin/sh = # Startup script for Zope = # = # description: Run zope (web management) server = = # Source function library. = . /etc/rc.d/init.d/functions = = prog="Zope" = = start() { = echo -n $"Starting $prog: " = /usr/local/zope/2.6.0/start -u nobody & = RETVAL=$? = return $RETVAL = } = = stop() { = /usr/local/zope/2.6.0/stop = return 0 = } = = case "$1" in = start) = start = ;; = = stop) = stop = ;; = = status) = status $prog = ;; = restart) = stop = start = ;; = condrestart) = ;; = = *) = echo $"Usage: $0 {start|stop|restart|status}" = exit 1 = = esac = = exit 0 = ======================================================================= = = In /etc/rc3.d, the link to the zope script is currently "S96zope" = = Andrew = = = = > Andrew Durdin at 22:08 (UTC+1100) on Thu, 12 Dec 2002 said: = > = > = Hi, = > = = > = I've been running Zope on my Win98 box just to try it out initially = (less = > = setup involved), but now I'm trying to install it on my Linux machine = for = > = better stability etc. I've successfully installed it, and it runs fine* = when = > = I start it manually, but I cannot get it to start on bootup: I've set up = a = > = script in /etc/rc.d/init.d/ and a link to it in /etc/rc.d/rc3.d/ (which = is = > = the correct runlevel), but although on bootup it says "Starting Zope.... = [ = > = OK ]", Zope actually doesn't launch. = > = Unfortunately, I don't have the details of the script with me at the = moment = > = (I'll get them ASAP), but until then does anyone know any reasons that = might = > = be causing this? Is there anything in particular that has to be started = > = before Zope? At present I'm trying to run it with ZServer on port 8080 = > = (although Apache is running on the box on port 80). = > = = > = Thanks, = > = = > = Andrew = > = = > = *Except for a warning about Python 2.2.2 being too new, and one about = > = running as "nobody" = > = = > = = > = _______________________________________________ = > = Zope maillist - Zope@zope.org = > = http://lists.zope.org/mailman/listinfo/zope = > = ** No cross posts or HTML encoding! ** = > = (Related lists - = > = http://lists.zope.org/mailman/listinfo/zope-announce = > = http://lists.zope.org/mailman/listinfo/zope-dev ) = > = = > =
Andrew Durdin writes:
what happens? Does it start up? It does....
... Hostname: box.lan Port: 8080 This means, Zope should answer HTTP requests at port "8080"
------ 2002-12-13T07:34:16 INFO(0) ZServer FTP server started at Fri Dec 13 07:34:16 2002 Hostname: box.lan Port: 8021 and FTP requests at port 8021.
Check, that it does indeed.... Dieter
Andrew Durdin wrote:
I've been running Zope on my Win98 box just to try it out initially (less setup involved), but now I'm trying to install it on my Linux machine for better stability etc. I've successfully installed it, and it runs fine* when I start it manually, but I cannot get it to start on bootup: I've set up a script in /etc/rc.d/init.d/ and a link to it in /etc/rc.d/rc3.d/ (which is the correct runlevel), but although on bootup it says "Starting Zope.... [ OK ]", Zope actually doesn't launch.
*Except for a warning about Python 2.2.2 being too new, and one about running as "nobody"
You should use Python-2.1.3 with ZOPE2.6!!! Download and install it from python.org. You have to set the -u flag if you start Zope at boot-time, because Zope doesn't like to be a root-process...;-) pleae read z2.py and doc/SETUID.txt for more infos on that. best practice: create a new user called 'zope' on your machine. set the right ownerships / permissions in the Zope-Installation-Directories and then start Zope with -u zope from your init-script. -mj -- German Zope User Group http://www.dzug.org/
Er, you the problems are in the warnings! Zope doesn't yet run on Python 2.2 (Zope 2.7 will). It sounds like there's also a problem with the user it's running as, Zope can run as nobody but that's not really a very good idea as you'd have to allow user nobody to write key Zope files which would be odd. The simplest way to get Zope running from RH is just to add a line to rc.local - that's what we do. A On 12/12/02 11:08 am, "Andrew Durdin" <adurdin@yahoo.com> wrote:
Hi,
I've been running Zope on my Win98 box just to try it out initially (less setup involved), but now I'm trying to install it on my Linux machine for better stability etc. I've successfully installed it, and it runs fine* when I start it manually, but I cannot get it to start on bootup: I've set up a script in /etc/rc.d/init.d/ and a link to it in /etc/rc.d/rc3.d/ (which is the correct runlevel), but although on bootup it says "Starting Zope.... [ OK ]", Zope actually doesn't launch. Unfortunately, I don't have the details of the script with me at the moment (I'll get them ASAP), but until then does anyone know any reasons that might be causing this? Is there anything in particular that has to be started before Zope? At present I'm trying to run it with ZServer on port 8080 (although Apache is running on the box on port 80).
Thanks,
Andrew
*Except for a warning about Python 2.2.2 being too new, and one about running as "nobody"
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
I'm currently working on RPMS for Zope 2.6.1b1 The SRPM, along with detailed install docs should be ready to test in a few days, as I am hoping to resolve any possible issues with the packaging by the end of the 2.6.1 beta cycle. I'll test with at least RedHat 8.0 and 7.3, contribs will of course be welcome to make things work on other rpm based distributions and versions. Keep an eye on http://www.zope.org/Members/dingo/Zope_RPMS I probably won't be rolling a 2.6.0 RPM release unless there's significant demand (eg, someone emails me and asks me to :-) Adam On Thu, 2002-12-12 at 06:08, Andrew Durdin wrote:
Hi,
I've been running Zope on my Win98 box just to try it out initially (less setup involved), but now I'm trying to install it on my Linux machine for better stability etc. I've successfully installed it, and it runs fine* when I start it manually, but I cannot get it to start on bootup: I've set up a script in /etc/rc.d/init.d/ and a link to it in /etc/rc.d/rc3.d/ (which is the correct runlevel), but although on bootup it says "Starting Zope.... [ OK ]", Zope actually doesn't launch. Unfortunately, I don't have the details of the script with me at the moment (I'll get them ASAP), but until then does anyone know any reasons that might be causing this? Is there anything in particular that has to be started before Zope? At present I'm trying to run it with ZServer on port 8080 (although Apache is running on the box on port 80).
Thanks,
Andrew
*Except for a warning about Python 2.2.2 being too new, and one about running as "nobody"
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (6)
-
Adam Manock -
Andrew Durdin -
Andrew Veitch -
Dieter Maurer -
ken -
Maik Jablonski