1.1 KiB
1.1 KiB
groupadd -g 501 www
useradd -u 501 -g 501 www
yum -y install pcre pcre-devel gcc-c++ perl perl-devel perl-ExtUtils-Embed openssl-devel
./configure --prefix=/usr/local/nginx \
--with-http_ssl_module --with-http_v2_module \
--with-http_realip_module --with-http_gunzip_module \
--with-http_gzip_static_module --with-http_stub_status_module \
--with-http_perl_module --with-stream \
--with-stream_ssl_module --with-stream_realip_module --with-pcre
make
make install
若make时失败,提示
relocation R_X86_64_32 against `.rodata' can not be used when making a shared object;
在configure前加上CFLAGS="-O3 -fPIC",即
CFLAGS="-O3 -fPIC" ./configure --prefix=/usr/local/nginx \
--with-http_ssl_module --with-http_v2_module \
--with-http_realip_module --with-http_gunzip_module \
--with-http_gzip_static_module --with-http_stub_status_module \
--with-http_perl_module --with-stream \
--with-stream_ssl_module --with-stream_realip_module --with-pcre