-   Linux - Server (
-   -   FC6 service command and nginx (

LaoTzu 02-26-2008 07:17 PM

FC6 service command and nginx
I am on FC6. Initially I used yum to install nginx. It works fine except that it picked up an older version. I wanted the latest version, so I compiled it with the latest nginx source. By default, it installs nginx in /usr/local/nginx. Unfortunately, I can't start nginx with the service command, I have to start it by typing out the whole path to the nginx executable, /usr/local/nginx/sbin/nginx. When I used yum, I could use the service command to start nginx. Is there a way for me to install nginx so that I can use the service command? I am guessing that yum puts the exes in a common location so that service can pick it up but I can't find where that location is.

cooljai 02-27-2008 07:33 AM

You need to create/replace script in /etc/init.d for controlling Nginx. This article might be helpful for you:

well, just for info, for what purpose, you're using Nginx? simple webserver or as load balancer?


LaoTzu 02-27-2008 11:10 AM

That doesn't help me adapt nginx to use the service command though, right? Like
"service nginx start", "service nginx stop", "servie nginx restart", etc.

I am using nginx as webserver and load balancer talking to a mongrel cluster. I have been using Apache up until now but it is a memory hog. I am seeing significant reduction in memory usage by nginx so far.

All times are GMT -5. The time now is 12:18 PM.