nginx install issue (fixed)

Edit: Ended up installing wrong version of Ubuntu, so going to be nuking server and starting over, so this is moot point. Learning is fun, but slow :)

Hi,

I went through the guide in the library to installing nginx (i'm installing to unbuntu 12 though) located at http://library.linode.com/web-servers/n … 0-maverick">http://library.linode.com/web-servers/nginx/installation/ubuntu-10.10-maverick

Everything went great till the last little bit. When I put in

wget -O init-deb.sh http://library.linode.com/assets/661-init-deb.sh
mv init-deb.sh /etc/init.d/nginx
chmod +x /etc/init.d/nginx
/usr/sbin/update-rc.d -f nginx defaults

When I got to the last step, I got this message in terminal:

sudo /usr/sbin/update-rc.d -f nginx defaults
 System start/stop links for /etc/init.d/nginx already exist.

I'm unsure what this means, and unsure how to tell if/when the service starts/stops.

Any help would be great. I'm new to setting up a server this way, and excited to learn, but this is my first attempt at such a thing. My end goal is to host some Drupal 7 sites on my 512 linode.

-Vidus

6 Replies

You can run /etc/init.d/nginx restart - if nginx is not already running, the "stopping" line will show an error, but the "starting" line should say "OK".

To verify that nginx is running, use ps awx | grep nginx - you should see something like this:

23776 ?        S      0:00 /opt/nginx/sbin/nginx
23871 pts/0    S+     0:00 grep nginx

If you only see the "grep nginx" line, then nginx is not running.

To determine whether nginx is automatically started at boot, reboot your Linode and run the check in the previous paragraph.

What part of the guide did you follow? The install via apt or the install from source? If the latter, you really shouldn't do that. The reason for installing from source on ubuntu 10.10 is that it shipped with a really old version of nginx (0.7.67), where the source instructions tell you how to install 1.x. ubuntu 12.04 shipped with 1.1.19. unless you really need something in 1.2, you should just install with apt and not from source.

I installed from apt-get. I ended up going through that last step of the guide because I was assuming either way I needed to edit those files.

If I've overwritten what came with the default apt-get install, should I just uninstall then install again?

Here is the result of what I got from those commands:

$ ps awx | grep nginx
 2119 pts/0    S+     0:00 grep --color=auto nginx
$ /etc/init.d/nginx restart
$ ps awx | grep nginx
 2122 pts/0    S+     0:00 grep --color=auto nginx

Ended up installing wrong version of Ubuntu, so going to be nuking server and starting over, so this is moot point. Learning is fun, but slow :)

@vidus:

I installed from apt-get. I ended up going through that last step of the guide because I was assuming either way I needed to edit those files.

Nope, notice that the part about getting the init script is under the "installing from source section". I see you've nuked already, so just go with the apt-get to install and then move on to the configuration section of the library.

> Nope, notice that the part about getting the init script is under the "installing from source section". I see you've nuked already, so just go with the apt-get to install and then move on to the configuration section of the library.

Thanks, will do! Totally misread the formatting on the guide first read through.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct