Forked from jmealo/openresty-nchan-redis-luarocks.sh
Created
September 20, 2017 17:43
-
-
Save wojons/746c7ce0c1aea878a5207ab4933ffda8 to your computer and use it in GitHub Desktop.
OpenResty + LuaRocks + Nchan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install -y libreadline-dev libncurses5-dev libpcre3-dev \ | |
libssl-dev perl make build-essential git curl \ | |
unzip | |
git clone https://github.com/openresty/stream-lua-nginx-module.git \ | |
--branch master \ | |
--single-branch /tmp/stream-lua-nginx-module-master | |
curl -L https://github.com/slact/nchan/archive/v1.1.7.tar.gz | tar xz -C /tmp | |
curl -L https://openresty.org/download/openresty-1.11.2.4.tar.gz | tar xz -C /tmp | |
cd /tmp/openresty-1.11.2.4 | |
./configure --add-module=/tmp/nchan-1.1.7 \ | |
--with-stream \ | |
--with-stream_ssl_module \ | |
--with-debug \ | |
--add-module=/tmp/stream-lua-nginx-module-master | |
make | |
make install | |
curl -L https://github.com/luarocks/luarocks/archive/v2.4.2.tar.gz | tar xz -C /tmp | |
cd /tmp/luarocks-2.4.2 | |
./configure --prefix=/usr/local/openresty/luajit \ | |
--with-lua=/usr/local/openresty/luajit/ \ | |
--lua-suffix=jit-2.1.0-beta2 \ | |
--with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 | |
make build | |
make install | |
luarocks install lua-struct | |
luarocks install lua-resty-http | |
git clone https://github.com/wojons/lua-resty-sse.git \ | |
--branch master \ | |
--single-branch /usr/local/openresty/lualib/resty/sse | |
# Enjoy luarocks as: | |
# sudo /usr/local/openresty/luajit/luarocks install lapis | |
# Luarocks was available as "/usr/local/openresty/luajit/luarocks~" for me, check that if it doesn't exist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment