[Zope] Whats the best way to Automatically Start Zope Serveron bootup??
Robert Geiger
rgeiger@bellsouth.net
Sat, 29 Jan 2000 19:38:00 -0500
Jules,
I have to admit, this is thoroughly awesome!! Thank you. You put several
pc's together from the manual that were not entirely clear for me.
I wound up getting it to work in a simpler, albeit less sophisticated and
probably less 'right' way, by editing the boot.local file.
At the end of boot.local, I put these lines...
cd /zopedir ## Had to cd, or start would not run correctly
. /start & ## Running as a background process stopped it from
## halting the rc boot process.
It is crude, but it works. I don't know what, if anything, is the downside
of this approach, but I would certainly like to know if there is one.
Again, thanks, and perhaps this SHOULD be your first(?) HOW-TO on your Zope
member site!! Nice job.
Robert
-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Jules
Sent: Saturday, January 29, 2000 6:52 PM
To: zope@zope.org
Cc: Robert Geiger
Subject: Re: [Zope] Whats the best way to Automatically Start Zope
Serveron bootup??
| Whats the best way to Automatically Start Zope Server on bootup??
|
| I have SuSE 6.2 system. I am having some trouble (newbie, sorry)
| deciding what the best way to start it up automatically. Docs say
| boot.local, but it stops the process.
|
| Do I run it as daemon? If so how? In background?? Not sure.
Yes, you do run it as a daemon and need to do a few tweaks to your system.
First, login as root. cd to /sbin/init.d/ and copy 'skeleton' to, say,
'zope' or whatever you want to call the script file.
Edit the zope file with your favorite text editor. Change all instances of
'START_FOO' to 'START_ZOPE'. Then in the start) and stop) sections,
uncomment (remove the "#" on that line) the startproc and killproc lines.
Depending on how you've got your system setup, you'll need to figure out
what goes here. If you're running ZServer so you'll want to put the path to
Zope's start and stop scripts where skeleton has /sbin/foo.
In the reload) section, uncomment the "$0 stop && $0 start ||
return=$rc_failed" line.
The status) section is the same as you've done to start) and stop). I don't
think probe) applies here so leave it as it is.
Save this file and exit the editor. Test it by calling /sbin/init.d/zope
start, /sbin/init.d/zope stop and /sbin/init.d/zope status.
Once that's working, the next step is to create a symbolic link from the
zope file you've created to one of the runlevel directories. I'd put mine in
rc2.d as that's a logical place to start services such as Zope.
cd to /sbin/init.d/rc2.d/ and type
ln -s ../zope S22zope
and then
ln -s ../zope K22zope
These files will be called when your system stops and starts providing an
environment variable has been defined.
So, the final step is to define that variable. cd to /etc and edit
rc.config. Make a backup if you're new to manually tweaking this file as if
you mess it up, your system may not boot!
Scroll down and somewhere just after all the START_* entries, put
#
# Start Zope Daemon? (yes/no)
#
START_ZOPE=yes
If you want to disable Zope when your system starts or stops, you can now
use yast to toggle the Yes or No entry.
If you upgrade SuSE to another release, be sure to keep a copy of the zope
shell file and /etc/rc.config. I don't think the move from 6.2 -> 6.3 messes
anything up but you never know. If yast replaces the files, you'll need to
edit them again. Probably the worst case is yast might strip out your edits
to rc.config but this is unlikely.
Good luck!
Cheers,
Jules
_______________________________________________
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 )