2.4.3 代码编译

OpenResty代码编译如下:


yum -y install gcc pcre-devel make zlib-devel openssl-devel libxml2-devel \
    libxslt-devel gd-devel GeoIP-devel libatomic_ops-devel luajit \
    luajit-devel perl-devel perl-ExtUtils-Embed

./configure \
    --with-threads \
    --with-file-aio \
    --with-http_ssl_module \
    --with-http_v2_module \
    --with-http_realip_module \
    --with-http_addition_module \
    --with-http_xslt_module=dynamic \
    --with-http_image_filter_module=dynamic \
    --with-http_geoip_module=dynamic \
    --with-http_sub_module \
    --with-http_dav_module \
    --with-http_flv_module \
    --with-http_mp4_module \
    --with-http_gunzip_module \
    --with-http_gzip_static_module \
    --with-http_auth_request_module \
    --with-http_random_index_module \
    --with-http_secure_link_module \
    --with-http_degradation_module \
    --with-http_slice_module \
    --with-http_stub_status_module \
    --with-stream=dynamic \
    --with-stream_ssl_module \
    --with-stream_realip_module \
    --with-stream_geoip_module=dynamic \
    --with-stream_ssl_preread_module 

gmake && gmake install

编译完成后,默认安装目录为/usr/local/openresty。Nginx安装在/usr/local/openresty/nginx目录下。