The nginx version in ubuntu 10.04′s repo is 0.7, it’s too old to me. I want to have a try of nginx 0.8. But I don’t want to compile it myself. I searched on the web and found the solution.
First of all, add a third party repository:
deb http://ppa.launchpad.net/jdub/devel/ubuntu lucid main
Then type the command:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E9EEF4A1
sudo apt-get update
At last, install the new nginx:
sudo apt-get install nginx.
It’s done.
Another thing is to enable multi processors of nginx, edit /etc/nginx/nginx.conf file:
vim /etc/nginx/nginx.conf
Set worker_processes number to 3 (I have four core in my cpu)
Add line:
worker_cpu_affinity 0010 0100 1000
This define nginx to use which three processors.
Then restart nginx to make it work.