nginxをソースインストール

表題の通り。2017/04/12に”1.12.0“がリリースされているのでこれをソースからインストールしてみる。

■ 環境

  • nginx 1.12.0
  • CentOS 6.3

■ nginx

取得、展開。

$ wget https://nginx.org/download/nginx-1.12.0.tar.gz
$ tar zxf nginx-1.12.0.tar.gz
$ cd nginx-1.12.0

また、公式のページには下記のようにある。

nginx news
https://nginx.org/

nginx-1.12.0 stable version has been released, incorporating new features and bug 
fixes from the 1.11.x mainline branch - including variables support and other 
improvements in the stream module, HTTP/2 fixes, support for multiple SSL 
certificates of different types, improved dynamic modules support, and more.

とのこと。

とりあえず`configure`してインストールする。オプションは今段階では特に設定しない。

$ ./configure

下記の依存があったので、これらのパッケージをインストールしておいた。

  • pcre-devel
  • zlib-devel
$ make && make install

インストールできたか確認する。`configure`で”prefix“を指定しないと下記の場所になるようだ。

$ /usr/local/nginx/sbin/nginx -v
nginx version: nginx/1.12.0
$

これからいろいろ試していこうかな。

以上。

■ 関連

nginx + ModSecurity