Home > gentoo, plugcomputer, Tip > Installation of nginx on Gentoo/Sheevaplug

Installation of nginx on Gentoo/Sheevaplug

step 1.

mkdir /etc/portage
echo "www-servers/nginx **" >>/etc/portage/packages.keywords

step 2.

emerge nginx

step 3.

mkdir -p /var/www/localhost/htdocs
echo "<h1>Hey it works</h1>" >>/var/www/localhost/htdocs/index.html

index.html is created for testing.

step 3.

vi /etc/nginx/nginx.conf

comment out the first line in server block (or change 127.0.0.1 to the ip you want httpd listens on), without this step nginx will only listens on 127.0.0.1

	server {
		#listen		127.0.0.1;
		server_name	localhost;

		access_log	/var/log/nginx/localhost.access_log main;
		error_log	/var/log/nginx/localhost.error_log info;

		root /var/www/localhost/htdocs;
	}

step 5.

mkdir /usr/logs
touch logs/nginx.lock.accept

[ without this step nginx will fail to start ]

step 7.

/etc/init.d/nginx start

step 8.
To verify nginx is running

pgrep nginx

It should report 2 pid numbers; run

netstat -na|grep :80

to test if the port binding is correct, you should see something similar to

tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN

Advertisements
Categories: gentoo, plugcomputer, Tip
  1. W-Mark Kubacki
    October 3, 2009 at 12:10 am

    With the lockfile your performance will be 60-70% of what you could get with “in-memory locks”, which are used on x86 and amd64 by default but not ARM.

    Try the patch from my gentoo overlay and skip step 5.

    By nginx version 0.8.18 the patch should not be needed anymore.

  2. W-Mark Kubacki
    October 3, 2009 at 12:11 am

    The patch will be linked here:

    http://mark.ossdl.de/2009/09/nginx-on-sheevaplug/

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s