動かざることバグの如し

近づきたいよ 君の理想に

最新安定版のNginxをインストールする Ubuntu/Debian

Ubuntuの場合

apt-get install software-properties-common

sudo apt-add-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx

Debianの場合

wget http://nginx.org/keys/nginx_signing.key
apt-key add nginx_signing.key

/etc/apt/sources.listに以下を追記

# nginx
deb http://nginx.org/packages/debian/ wheezy nginx
deb-src http://nginx.org/packages/debian/ wheezy nginx

「wheezy」の部分は各OSによって変わるので注意

  • Debian
    • 6.x : squeeze
    • 7.x : wheezy
  • Ubuntu
    • 10.04 : lucid
    • 11.10 : oneiric
    • 12.04 : precise
    • 12.10 quantal

あとはupdateしてインストールすれば最新安定版が入るはず。