nginx1.2.0 がリリースされてたので入れてみます。
[参考]
高速なHTTPサーバー「nginx 1.2」がリリースされる - SourceForge.JP Magazine : オープンソースの話題満載
ソースをダウンロードしてコンパイル&インストール。
$ tar zxvf nginx-1.2.0.tar.gz $ cd nginx-1.2.0/ $ ./configure --prefix=/usr/local/nginx-1.2.0 $ make $ make install
ついでに strip 。
$ sudo strip /usr/local/nginx-1.2.0/sbin/nginx
80 番ポートは使ってるので 変更します。
$ sudo vi /usr/local/nginx-1.2.0/conf/nginx.conf
server {
#listen 80;
listen 8012;
server_name localhost;
起動します。
$ sudo /usr/local/nginx-1.2.0/sbin/nginx
ちゃんとポートが LISTEN されています。
$ netstat -ant | grep 8012
tcp 0 0 0.0.0.0:8012 0.0.0.0:* LISTEN
nginx はコンパイル時にモジュールを指定しなくてはならないので パッケージで入れているとちょっと不便かと思ったのですが PPA で追加した場合や oneiric (Ubuntu11.10) では nginx はモジュールの組み合わせで いくつかのパッケージに分かれているようです。
nginx nginx-light nginx-full nginx-extras
nginx というパッケージを入れた場合 nginx-full になるようです。
パッケージごとのモジュールを比較してみました。
| 分類 | モジュール名 | Light | Full | Extras |
|---|---|---|---|---|
| Standard HTTP | Core | ○ | ○ | ○ |
| Access | ○ | ○ | ○ | |
| Auth Basic | ○ | ○ | ○ | |
| Auto Index | ○ | ○ | ○ | |
| Browser | - | ○ | ○ | |
| Charset | ○ | ○ | ○ | |
| Empty GIF | ○ | ○ | ○ | |
| FastCGI | ○ | ○ | ○ | |
| Geo | - | ○ | ○ | |
| Gzip | ○ | ○ | ○ | |
| Headers | ○ | ○ | ○ | |
| Index | ○ | ○ | ○ | |
| Limit Requests | - | ○ | ○ | |
| Limit Zone | - | ○ | ○ | |
| Log | ○ | ○ | ○ | |
| Map | - | ○ | ○ | |
| Memcached | - | ○ | ○ | |
| Proxy | ○ | ○ | ○ | |
| Referer | - | ○ | ○ | |
| Rewrite | ○ | ○ | ○ | |
| SCGI | - | ○ | ○ | |
| Split Clients | ○ | ○ | ○ | |
| SSI | - | ○ | ○ | |
| Upstream | ○ | ○ | ○ | |
| User ID | ○ | ○ | ○ | |
| UWSGI | - | ○ | ○ | |
| Optional HTTP | Debug | - | ○ | ○ |
| WebDAV | - | ○ | ○ | |
| Flash Streaming Video | - | - | ○ | |
| GeoIP | - | ○ | ○ | |
| Gzip Precompression | ○ | ○ | ○ | |
| Image Filter | - | ○ | ○ | |
| RealIP | - | ○ | ○ | |
| Stub Status | - | ○ | ○ | |
| XSLT | - | ○ | ○ | |
| IPv6 | ○ | ○ | ○ | |
| Embedded Perl | - | - | ○ | |
| Secure Link | - | - | ○ | |
| Random Index | - | - | ○ | |
| Addition | - | ○ | ○ | |
| Mail Core | - | ○ | ○ | |
| POP3 | - | ○ | ○ | |
| IMAP | - | ○ | ○ | |
| SMTP | - | ○ | ○ | |
| SSL | - | ○ | ○ | |
| Third Party | Upstream Fair Queue | - | ○ | ○ |
| Echo | ○ | ○ | ○ | |
| Embedded Lua | - | - | ○ | |
| Nginx Development Kit | - | - | ○ | |
| Other | File AIO | - | - | ○ |
とりあえずメモ。
前に PPA を使って nginx (1.0.5) を Ubuntu10.04 に入れたときの configure の内容を 書きましたが、 PPA を使わない nginx 0.7.65 の内容も書いておきます。
$ nginx -V
nginx version: nginx/0.7.65
TLS SNI support enabled
configure arguments:
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--pid-path=/var/run/nginx.pid
--lock-path=/var/lock/nginx.lock
--http-log-path=/var/log/nginx/access.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--with-debug
--with-http_stub_status_module
--with-http_flv_module
--with-http_ssl_module
--with-http_dav_module
--with-http_gzip_static_module
--with-http_realip_module
--with-mail
--with-mail_ssl_module
--with-ipv6
--add-module=/build/buildd/nginx-0.7.65/modules/nginx-upstream-fair
こちらもメモ。
nginx (1.0.5) を Ubuntu10.04 に入れたときの configure の内容です。
nginx は動的にモジュールの設定ができず configure で指定するしかないそうなので パッケージで入れる場合 どういう設定になっているかは重要ですね。
"-V" オプションで詳細を見ることができます。
$ nginx -V
nginx: nginx version: nginx/1.0.5
nginx: TLS SNI support enabled
nginx: configure arguments:
--prefix=/etc/nginx
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--http-log-path=/var/log/nginx/access.log
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-scgi-temp-path=/var/lib/nginx/scgi
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi
--lock-path=/var/lock/nginx.lock
--pid-path=/var/run/nginx.pid
--with-debug
--with-http_addition_module
--with-http_dav_module
--with-http_geoip_module
--with-http_gzip_static_module
--with-http_image_filter_module
--with-http_realip_module
--with-http_stub_status_module
--with-http_ssl_module
--with-http_sub_module
--with-http_xslt_module
--with-ipv6
--with-sha1=/usr/include/openssl
--with-md5=/usr/include/openssl
--with-mail
--with-mail_ssl_module
--add-module=/build/buildd/nginx-1.0.5/debian/modules/nginx-echo
--add-module=/build/buildd/nginx-1.0.5/debian/modules/nginx-upstream-fair
とりあえずメモ。
nginx という Web サーバが かなりキてるということなので さっそくインストールしてみました。
[参考]
NginxJa - nginx
ちなみに「エンジンエックス」と読むそうです。
Ubuntu にはパッケージが用意されているので 普通に apt-get でインストールすることができます。
$ sudo apt-get install nginx
11/08/22 時点では ver 0.7.65 が入りました。
上記サイトを参考に もっと新しいバージョンを入れてみます。 以下のコマンドで lucid 版の PPA を追加してインストールします。
$ sudo sh -c "echo deb http://ppa.launchpad.net/nginx/stable/ubuntu lucid main > /etc/apt/sources.list.d/nginx-stable-lucid.list" $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C $ sudo apt-get update $ sudo apt-get install nginx
11/09/01 時点では ver 1.0.5 が入りました。