历史版本见 http://openresty.org/wget http://openresty.org/download/ngx_openresty-1.7.2.1.tar.gz
apt-get install libreadline-dev libpcre3-dev libssl-dev libpq-dev perl gcc g++ autoconf automake build-essential3.下载 pcre
更多版本 http://sourceforge.net/projects/pcre/files/pcre/http://sourceforge.net/projects/pcre/files/pcre/8.35/
tar zxvf pcre-8.35.tar.gz
cd pcre-8.35/
./configure --enable-jit --prefix=/opt/openresty/pcre
make && make install
tar zxvf ngx_openresty-1.7.2.1.tar.gz
cd ngx_openresty-1.7.2.1/
./configure --help
然后根据所需选择需开启的功能
./configure --prefix=/opt/openresty --with-http_iconv_module --with-http_postgres_module --with-luajit --with-luajit-xcflags=-DLUAJIT_ENABLE_LUA52COMPAT --with-pcre=/opt/pcre-8.35/ --with-pcre-jit --with-http_ssl_module
或者机器支持多核,例如双核make
make -j2 (
make -j $(getconf _NPROCESSORS_CONF) 可以使用这种方式来获得cpu信息
make install
(1)下载源码
git clone https://github.com/cloudflare/lua-aho-corasick
(2)编译
make -C /root/lua-aho-corasick/ CFLAGS='-g -O3 -Wall' LUA_INCLUDE_DIR=/opt/openresty/luajit/include/luajit-2.1
make -C /root/lua-aho-corasick/ DESTDIR=/opt/openresty/ PREFIX=luajit install
示例2: 安装luasocket
wget http://files.luaforge.net/releases/luasocket/luasocket/luasocket-2.0.2/luasocket-2.0.2.tar.gz
tar zxvf luasocket-2.0.2.tar.gz
cd luasocket-2.0.2/
编译
make -C /root/luasocket-2.0.2 INSTALL_TOP_SHARE=/opt/openresty/luajit/share/lua/5.1/ INSTALL_TOP_LIB=/opt/openresty/luajit/lib/lua/5.1/ LUAINC="-I /opt/openresty/luajit/include/luajit-2.1" install
安装成功后的openrestry目录结构

7.支持的模块简介
http://app.yinxiang.com/l/AAJIQXsu-VRMYpHZXyIpb_gazm_YoOWmr1k/
http://vdisk.weibo.com/s/G_jLEbJqrrxD/1413016756
https://github.com/cloudflare
https://github.com/calio