Ubuntu 10.04 LTS (Lucid Lynx)にnginxのリポジトリを追加する
今年もそろそろブログのネタに困る時期になってきました。
昨年末からハートビーツさんのブログでnginxネタが連載されているので、更新を楽しみにしています。
つい先日に第2回が公開され、インストール方法が分かりやすく解説されておりました。
CentOSでnginxのyumリポジトリを追加されていたようでしたので、私はUbuntuでリポジトリ追加方法についてまとめておきました。
Ubuntuは公式でAWSで使用可能なAMIを公開しているので、こちらを使いました。
具体的にはUbuntuの10.04となります。
EC2インスタンスの起動は以下のようなコマンドとなります。
※もちろんManagement Consoleを使用してもOKです
$ ec2-run-instances ami-36e65037 --instance-type t1.micro --region ap-northeast-1 --key your-key --group your-group
Ubuntuの標準パッケージでインストールが出来るバージョン(0.7.65)を確認
$ sudo aptitude show nginx Package: nginx State: not installed Version: 0.7.65-1ubuntu2.1 Priority: optional Section: universe/httpd Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Uncompressed Size: 897k Depends: libc6 (>= 2.4), libpcre3 (>= 7.7), libssl0.9.8 (>= 0.9.8k-1), zlib1g (>= 1:1.1.4), lsb-base (>= 3.2-14) Suggests: ufw Provides: httpd Description: small, but very powerful and efficient web server and mail proxy Nginx (engine x) is a web server created by Igor Sysoev and kindly provided to the open-source community. This server can be used as standalone HTTP server and as a reverse proxy server before some Apache or another big server to reduce load to backend servers by many concurrent HTTP-sessions. It can also act as a POP3/IMAP mail proxy with SSL and TLS SNI support. Homepage: http://nginx.net
最新の安定板がインストール出来るリポジトリを追加します
$ echo "deb http://ppa.launchpad.net/nginx/stable/ubuntu lucid main" | sudo tee -a /etc/apt/sources.list deb http://ppa.launchpad.net/nginx/stable/ubuntu lucid main $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C $ apt-get update $ sudo aptitude show nginx Package: nginx State: not installed Version: 1.0.11-1ppa1~lucid Priority: optional Section: httpd Maintainer: Jose Parrella <bureado@debian.org> Uncompressed Size: 90.1k Depends: nginx-full | nginx-light Provided by: nginx-extras, nginx-full, nginx-light Description: small, but very powerful and efficient web server and mail proxy Nginx (engine x) is a web server created by Igor Sysoev and kindly provided to the open-source community. This server can be used as standalone HTTP server and as a reverse proxy server before some Apache or another big server to reduce load to backend servers by many concurrent HTTP-sessions. This is a dummy package that selects nginx-full by default, but also can be installed with nginx-light for upgrading to nginx-light directly.
実際にインストールしてバージョンを確認します
$ sudo apt-get install nginx $ nginx -v nginx version: nginx/1.0.11
nginxはバージョン1.0.11がリリースされていたんですね。
私のテスト用インスタンスはまだソースからコンパイルした10.0.10なのですが、こういう時はやっぱりパッケージ管理システムは便利だなぁ。