Forked from jmealo/openresty-nchan-redis-luarocks.sh
Last active
August 24, 2017 05:52
-
-
Save aguereca/25ae677892f2623044bba05841face13 to your computer and use it in GitHub Desktop.
OpenResty + LuaRocks (Nchan optional)
This file contains hidden or 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
| # For Linux: | |
| #apt-get install -y libreadline-dev libncurses5-dev libpcre3-dev \ | |
| # libssl-dev perl make build-essential git curl \ | |
| # unzip | |
| ## Uncomment to install with nChan | |
| #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 | |
| # | |
| # Easier with Homebrew: | |
| brew install openresty | |
| # Make luajit look like plain lua | |
| cd /usr/local/Cellar/openresty-1.11.2.4/luajit/bin | |
| ln -sf luajit-2.1.0-beta2 lua | |
| ln -sf lua /usr/local/bin/lua | |
| cd /usr/local/Cellar/openresty-1.11.2.4/luajit/include | |
| ln -sf luajit-2.1 lua5.1 | |
| 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/Cellar/openresty/1.11.2.4/luajit \ | |
| --with-lua=/usr/local/Cellar/openresty/1.11.2.4/luajit/ \ | |
| --lua-suffix=jit-2.1.0-beta2 \ | |
| --with-lua-include=/usr/local/Cellar/openresty/1.11.2.4/luajit/include/luajit-2.1 | |
| make build | |
| make install | |
| luarocks install lua-resty-http | |
| ## If Nchan installed: | |
| #luarocks install lua-struct | |
| #git clone https://github.com/wojons/lua-resty-sse.git \ | |
| # --branch master \ | |
| # --single-branch /usr/local/openresty/lualib/resty/sse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment