-
-
Save wojons/3d72509c126bb480ade57bb18cb321f4 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 | |
wget https://github.com/openresty/stream-lua-nginx-module/archive/v0.0.1.tar.gz \ | |
-O /tmp/stream-lua-nginx-module-0.0.1.tar.gz | |
mkdir /tmp/stream-lua-nginx-module-0.0.1 | |
tar xzvf /tmp/stream-lua-nginx-module-0.0.1.tar.gz -C /tmp/stream-lua-nginx-module-0.0.1 | |
wget https://github.com/slact/nchan/archive/v0.99.16.tar.gz \ | |
-O /tmp/nchan-v0.99.16.tar.gz | |
mkdir /tmp/nchan-v0.99.16 | |
tar xzvf /tmp/nchan-v0.99.16.tar.gz -C /tmp/nchan-v0.99.16 | |
wget https://openresty.org/download/openresty-1.9.15.1.tar.gz \ | |
-O /tmp/openresty-1.9.15.1.tar.gz | |
tar xzvf /tmp/openresty-1.9.15.1.tar.gz -C /tmp/openresty-1.9.15.1 | |
cd /tmp/openresty-1.9.15.1 | |
./configure --add-module=/tmp/nchan-v0.99.16/nchan-0.99.16 \ | |
--with-stream \ | |
--with-stream_ssl_module \ | |
--with-debug \ | |
--add-module=/tmp/stream-lua-nginx-module-0.0.1/stream-lua-nginx-module-0.0.1 | |
make | |
sudo make install | |
luarocks install lua-struct | |
luarocks install lua-resty-http | |
git clone https://github.com/wojons/lua-resty-sse.git /usr/local/openresty/lualib/resty/sse | |
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-beta2 \ | |
--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 |
Thaknks i can always copy it back in this was just to solve a need one weekend i have the docker version of this somewhere
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great script. I made some updates:
https://gist.github.com/jmealo/e3cf626411980898a3581908b2b7d130
Fixes:
unzip
,git
, andcurl
(
unzip
andcurl
are required byluarocks
)Improvements:
curl
directly intotar