Nginx as a Linux Service

Jim Ohlstein jim.ohlstein at
Fri Oct 31 15:39:02 MSK 2008

This is getting a bit far afield, but run level 4 is generally not used.

Run level 3 is the default. Run level 2 is the same as 3 except that networking is not running. It's probably irrelevant on a remote machine.

As long as it's set "on" at level 3 it's probably OK.

In RHEL you can also use ntsysv to set any service to start at boot up. It provides a visual list with check boxes. I believe that it defaults to the current run level which is probably 3.

I assume that you are using a remote server. If you have an old machine that you aren't using, installing RHEL or CentOS and adding it to your LAN might be really helpful. Worst that can happen is you screw up everything and re-install the OS wiser from having learned from your mistake.


-----Original Message-----
From: owner-nginx at [mailto:owner-nginx at] On Behalf Of Chris Gers32
Sent: Friday, October 31, 2008 6:43 AM
To: nginx at
Subject: Re: RE: Nginx as a Linux Service

Jim Ohlstein wrote:
> In RHEL:
>   chkconfig --add nginx
>   chkconfig --level 235 nginx-on

I read here (

Unfortunately, all Linux distributions do not follow the same definition 
for runlevels. Under Red Hat, the following defaults are supported:

   0.   System halt
   1.   Single-user mode
   2.   Multiuser, without NFS
   3.   Complete multiuser mode
   4.   User defined
   5.   X11 (XDM login)
   6.   Reboot

Following the book "Deploying Rails Applications", I did this for 

sudo /sbin/chkconfig --level 345 mongrel_cluster on

Should I have used 235 instead, or must mongrel_cluster and nginx be 
configured differently? I assume the information in the book was not Red 


Posted via

More information about the nginx mailing list