LoginSignup
1
1

More than 5 years have passed since last update.

nginx-buildでOpenRestyをビルドしよう

Last updated at Posted at 2014-12-06

1日目にnginx-buildでnginxをビルドしようを書いた@cubicdaiyaです。せっかくのカレンダーに穴を開けるのもなんなので、nginx-buildOpenRestyに対応させた話をサクッと書きます。

OpenResty

OpenRestyはnginxと便利なサードパーティモジュール一式やLuaとLuaJIT、ngx_lua向けのLuaモジュール(lua-resty-xxx)をバンドルしたアプリケーションフレームワークです。ngx_luaを利用したことがあるなら知っている方も多いのではないかと思います。

OpenRestyをnginx-buildでビルドする

OpenRestyをnginx-buildでビルドするにはnginx-buildのバージョンが0.2.0以上である必要があります。バージョンが古い場合はgo get -uでnginx-buildを更新するか、

 go get -u github.com/cubicdaiya/nginx-build

最新のバイナリをこちらからダウンロードしてください。

それではnginx-buildでOpenRestyをビルドしてみましょう。

$ nginx-build -d work -openresty -pcre
nginx-build: 0.2.0
Compiler: gc go1.3.3
2014/12/06 14:36:51 [warn]configure option is empty.
2014/12/06 14:36:51 Download pcre-8.36.....
2014/12/06 14:36:51 Download ngx_openresty-1.7.4.1.....
2014/12/06 14:36:54 Extract ngx_openresty-1.7.4.1.tar.gz.....
2014/12/06 14:36:57 Extract pcre-8.36.tar.gz.....
2014/12/06 14:36:57 Generate configure script for ngx_openresty-1.7.4.1.....
2014/12/06 14:36:57 Configure ngx_openresty-1.7.4.1.....
2014/12/06 14:37:24 Build ngx_openresty-1.7.4.1.....
2014/12/06 14:37:42 Complete building nginx!


2014/12/06 14:37:42 Enter the following command for install nginx.

   $ cd work/1.7.4.1/ngx_openresty-1.7.4.1
   $ sudo make install
$

というわけでnginx-buildをOpenRestyに対応させた話でした。

最後に

nginx Advent Calendar 2014はまだ1/3ちょっとしか埋まってないのでまだまだ参加者募集中です。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1