CentOS平台 OpenResty源码编译安装

安装依赖包

yum install -y make cmake gcc gcc-c++ autoconf automake libpng-devel libjpeg-devel zlib libxml2-devel ncurses-devel bison libtool-ltdl-devel libiconv libmcrypt mhash mcrypt pcre-devel openssl-devel freetype-devel libcurl-devel readline-devel curl

下载安装包

 wget https://openresty.org/download/openresty-1.11.2.5.tar.gz
 wget https://www.openssl.org/source/openssl-1.0.2g.tar.gz
 wget http://jaist.dl.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz

解压

tar -zxvf openresty-1.11.2.5.tar.gz
tar -zxvf openssl-1.0.2g.tar.gz
tar -zxvf zlib-1.2.8.tar.gz

cp -r openssl-1.0.2g /usr/local/openssl-1.0.2g
cp -r zlib-1.2.8 /usr/local/zlib-1.2.8

安装openssl,zlib

cd /usr/local/openssl-1.0.2g
./config --prefix=/usr/local/openssl
./config -t
make & make install

cd /usr/local/zlib-1.2.8
./configure  --prefix=/usr/local/zlib
make & make install

安装配置

cd openresty-1.11.2.5
./configure --prefix=/usr/local/openresty-1.11.2.5 --with-luajit --with-stream --with
-http_iconv_module --with-http_realip_module --with-ld-opt="-Wl,-rpath,/usr/local/lib"  
--with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with
-openssl=/usr/local/openssl-1.0.2g --with-zlib=/usr/local/zlib-1.2.8

gmake
gmake install
文档更新时间: 2018-11-22 11:34   作者:RuM