wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.42.tar.bz2
tar xjf pcre-8.42.tar.bz2
cd pcre-8.42
./configure --prefix=/usr/local/openresty/pcre \
--disable-cpp --enable-jit \
--enable-utf --enable-unicode-properties
make -j24 V=1 > /dev/stderr
make install
rm -rf /usr/local/openresty/pcre/bin
rm -rf /usr/local/openresty/pcre/share
rm -f /usr/local/openresty/pcre/lib/*.la
rm -f /usr/local/openresty/pcre/lib/*pcrecpp*
rm -f /usr/local/openresty/pcre/lib/*pcreposix*
rm -rf /usr/local/openresty/pcre/lib/pkgconfig
# 安装zlib
cd /usr/local/src
wget http://www.zlib.net/zlib-1.2.11.tar.xz
tar xf zlib-1.2.11.tar.xz
cd zlib-1.2.11
./configure --prefix=/usr/local/openresty/zlib
make -j24 \
CFLAGS='-O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -g' \
SFLAGS='-O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -g' > /dev/stderr
make install
rm -rf /usr/local/openresty/zlib/share/
rm -f /usr/local/openresty/zlib/lib/*.la
rm -rf /usr/local/openresty/zlib/lib/pkgconfig/
# 安装openssl
cd /usr/local/src
wget https://www.openssl.org/source/openssl-1.1.0j.tar.gz
wget https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-1.1.0d-sess_set_get_cb_yield.patch --no-check-certificate
wget https://raw.githubusercontent.com/openresty/openresty/master/patches/openssl-1.1.0j-parallel_build_fix.patch --no-check-certificate
tar zxf openssl-1.1.0j.tar.gz
cd openssl-1.1.0j
patch -p1 < ../openssl-1.1.0d-sess_set_get_cb_yield.patch
patch -p1 < ../openssl-1.1.0j-parallel_build_fix.patch
./config \
no-threads shared zlib -g \
enable-ssl3 enable-ssl3-method \
--prefix=/usr/local/openresty/openssl \
--libdir=lib \
-I%/usr/local/openresty/zlib/include \
-L%/usr/local/openresty/zlib/lib \
-Wl,-rpath,/usr/local/openresty/zlib/lib:/usr/local/openresty/openssl/lib
make -j24
make install_sw
rm -f /usr/local/openresty/openssl/bin/c_rehash
rm -rf /usr/local/openresty/openssl/lib/pkgconfig
# 最后开始编译安装openresty
cd /usr/local/src
wget https://openresty.org/download/openresty-1.15.8.1.tar.gz # 如果下载出现ssl报错,yum update wget,再下载
tar zxf openresty-1.15.8.1.tar.gz
cd openresty-1.15.8.1
./configure \
--prefix=/usr/local/openresty \
--with-cc-opt="-DNGX_LUA_ABORT_AT_PANIC \
-I/usrl/local/openresty/zlib/include \
-I/usr/local/openresty/pcre/include \
-I/usr/local/openresty/openssl/include" \
--with-ld-opt="-L/usr/local/openresty/zlib/lib \
-L/usr/local/openresty/pcre/lib \
-L/usr/local/openresty/openssl/lib \
-Wl,-rpath,/usr/local/openresty/zlib/lib:/usr/local/openresty/pcre/lib:/usr/local/openresty/openssl/lib" \
--with-pcre-jit \
--without-http_rds_json_module \
--without-http_rds_csv_module \
--without-lua_rds_parser \
--with-stream \
--with-stream_ssl_module \
--with-stream_ssl_preread_module \
--with-http_v2_module \
--without-mail_pop3_module \
--without-mail_imap_module \
--without-mail_smtp_module \
--with-http_stub_status_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_auth_request_module \
--with-http_secure_link_module \
--with-http_random_index_module \
--with-http_gzip_static_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gunzip_module \
--with-threads \
--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT' \
-j24
make -j24
make install
rm -rf /usr/local/openresty/luajit/share/man
rm -rf /usr/local/openresty/luajit/lib/libluajit-5.1.a
05-19
09-27
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交