Skip to content

Instantly share code, notes, and snippets.

@toritori0318
Last active August 29, 2015 14:10
Show Gist options
  • Save toritori0318/9d4a30d26c066b12cd24 to your computer and use it in GitHub Desktop.
Save toritori0318/9d4a30d26c066b12cd24 to your computer and use it in GitHub Desktop.
openresty install
PCRE_VERSION=8.36
OPENRESTY_VERSION=1.7.7.1
LUAROCKS_VERSION=2.2.0
# depends
sudo yum install -y openssl-devel
# pcre
cd /tmp
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PCRE_VERSION}.tar.gz
tar zxf pcre-${PCRE_VERSION}.tar.gz
# openresty
wget http://openresty.org/download/ngx_openresty-${OPENRESTY_VERSION}.tar.gz
tar zxf ngx_openresty-${OPENRESTY_VERSION}.tar.gz
cd ngx_openresty-${OPENRESTY_VERSION}
export PATH=/sbin:$PATH
./configure --with-luajit --prefix=/opt/openresty --with-http_gzip_static_module --with-pcre=/tmp/pcre-${PCRE_VERSION} --with-pcre-jit
make
sudo make install
# luarocks
wget http://luarocks.org/releases/luarocks-${LUAROCKS_VERSION}.tar.gz
tar zxf luarocks-${LUAROCKS_VERSION}.tar.gz
cd luarocks-${LUAROCKS_VERSION}
./configure --with-lua=/opt/openresty/luajit \
--with-lua-include=/opt/openresty/luajit/include/luajit-2.1 \
--with-lua-lib=/opt/openresty/lualib
make
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment