Nginx as a Linux Service

Jim Ohlstein jim.ohlstein at gmail.com
Mon Nov 17 21:04:59 MSK 2008


Try using the start-stop-daemon:

# wget http://developer.axis.com/download/distribution/apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz

# tar zxvf apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz

# cd apps/sys-utils/start-stop-daemon-IR1_9_18-2/

# gcc start-stop-daemon.c -o start-stop-daemon

# cp start-stop-daemon /usr/sbin/

Then use the init script at http://articles.slicehost.com/2007/10/19/ubuntu-feisty-adding-an-nginx-init-script. Copy it to /etc/init.d/nginx and chmod to 755. Then you can add nginx to chkconfig. That script assumes that you have nginx in /usr/local/sbin/. If it's elsewhere adjust the path.

Good luck.

Jim

-----Original Message-----
From: owner-nginx at sysoev.ru [mailto:owner-nginx at sysoev.ru] On Behalf Of Chris Gers32
Sent: Monday, November 17, 2008 9:16 AM
To: nginx at sysoev.ru
Subject: RE: Nginx as a Linux Service

Well well, here's a new problem:

[chris at localhost ~]$ sudo /sbin/chkconfig nginx on
service nginx does not support chkconfig
[chris at localhost ~]$ nginx -v
nginx version: nginx/0.6.32[chris at localhost ~]$ /sbin/chkconfig -v
chkconfig version 1.3.13.4

Am I not running the right version of either nginx or chkconfig (came by 
default with my RHEL 4.4 virtual appliance)?

Thanks,

Chris.
-- 
Posted via http://www.ruby-forum.com/.






More information about the nginx mailing list