LoginSignup
4
5

More than 5 years have passed since last update.

nginx + lua_nginx_moduleでLuarocksと連携させるメモ

Last updated at Posted at 2014-11-12

lua.hを探す

lua_nginx_moduleを入れた時に導入したluajitのincludeパスを取得
環境にも依るが大体は

/usr/local/luajit/include/luajit-2.0

辺りに入ってる、というか入っていた。

Luarocksのビルド

$ wget http://luarocks.org/releases/luarocks-2.1.2.tar.gz
$ tar -zxvf luarocks-2.1.2.tar.gz
$ mv luarocks-2.1.2 /usr/local/src/luarocks && cd /usr/local/src/luarocks

$ ./configure --with-lua-include=[luajitのincludeパス]
$ make build
$ make install

確認

$ luarocks --version

~~下が出れば成功
/usr/local/bin/luarocks 2.1.2
LuaRocks main command-line interface

luarocksでインストールしたライブラリがnginxのcontent_by_luaから使える筈

4
5
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
4
5