Skip to content

Instantly share code, notes, and snippets.

@pcdinh
Forked from yagop/openresty-luarocks.sh
Created July 28, 2017 11:19
Show Gist options
  • Save pcdinh/860490e5ea34672aca4418caa8c22f77 to your computer and use it in GitHub Desktop.
Save pcdinh/860490e5ea34672aca4418caa8c22f77 to your computer and use it in GitHub Desktop.
OpenResty + LuaRocks
wget http://openresty.org/download/ngx_openresty-1.7.10.1.tar.gz \
-O ngx_openresty-1.7.10.1.tar.gz
tar xzvf ngx_openresty-1.7.10.1.tar.gz
cd ngx_openresty-1.7.10.1
./configure
make
sudo make install
wget https://codeload.github.com/keplerproject/luarocks/tar.gz/v2.0.13 \
-O luarocks-2.0.13.tar.gz
tar -xzvf luarocks-2.0.13.tar.gz
cd luarocks-2.0.13/
./configure --prefix=/usr/local/openresty/luajit \
--with-lua=/usr/local/openresty/luajit/ \
--lua-suffix=jit-2.1.0-alpha \
--with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1
make
sudo make install
# Enjoy luarocks as:
# sudo /usr/local/openresty/luajit/luarocks install lapis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment