The first Zope3 site I built a few months ago is still running on our development server. Which was a decision. We did not want to experiment with this new technique on a server also serving customer sites.
To be honest. I also did not get to installing Zope3 in such a way that it would fire up my z3 application when the server is restarted. Until yesterday, everytime the server was rebooted—not too uncommon for a development server—I had to restart my Zope application manually.
How nice would it be to be able to just reboot without bothering about restarting my Zope application. And eventually I should get this site onto one of our production servers of course.
Anyway, my Linux skills do not go far beyond ‘user’ level. With the difference that I have ‘root’ access. A dangerous combination 🙂
After some searching (thanks fromdownunder) I succeeded.
Assuming you have
- RedHat Linux Fedora Core3
- a Zope3 instance installed that you can start manually
Here’s the How-To get Zope3 running as a Linux daemon service.
- Change to root with
su
- Copy <your z3 instance path>/bin/zopectl to /etc/init.d/zope3ctl
- Edit /etc/init.d/zope3ctl to include (new: lines 2-3)
#!/usr/bin/python
# chkconfig: 345 30 70
# description: Zope - My installation
- Then run from the command line
/sbin/chkconfig --add zope3ctl
and
/sbin/service zope3ctl start
If all went well, you should read something about a process having been started.
You can check if your zope3ctl was added to the services list, run
/sbin/chkconfig --list zope3ctl
Comments are welcome.
I was very pleased to find these instructions, but they didn’t work for me.
On running “service zope3ctl start” I get:
Error: error opening file /etc/rc.d/etc/zdaemon.conf: [Errno 2] No such file or directory: ‘/etc/rc.d/etc/zdaemon.conf’