刚安装完Centos并下载好nginx,在使用configure编译时提示缺少相关组件,以下为安装步骤:
1.安装依赖库
2.运行configure
3.安装
1.安装依赖库
yum install gcc openssl-devel pcre-devel zlib-devel
2.运行configure
./configure \
--prefix=/usr \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--pid-path=/var/run/nginx/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_gzip_static_module \
--http-log-path=/var/log/nginx/access.log \
--http-client-body-temp-path=/var/run/nginx/client/ \
--http-proxy-temp-path=/var/run/nginx/proxy/ \
--http-fastcgi-temp-path=/var/run/nginx/fcgi/ \
--http-uwsgi-temp-path=/var/run/nginx/uwsgi/ \
--http-scgi-temp-path=/var/run/nginx/scgi/
3.安装
make && make install