编译环境:
yum install pcre pcre-devel
yum install openssl openssl-devel
yum install libxml2 libxml2-devel libxslt libxslt-devel
yum install gd gd-devel
下载nginx 1.24.0
wget https://github.com/nginx/nginx/archive/refs/tags/release-1.24.0.tar.gz
编译配置:
./configure \
--prefix=/etc/nginx \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--http-log-path=/var/log/nginx/access.log \
--error-log-path=/var/log/nginx/error.log \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/run/nginx.lock \
--http-client-body-temp-path=/var/cache/nginx/client_temp \
--http-proxy-temp-path=/var/cache/nginx/proxy_temp \
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \
--http-scgi-temp-path=/var/cache/nginx/scgi_temp \
--user=nginx \
--group=nginx \
--with-compat \
--with-file-aio \
--with-threads \
--with-http_addition_module \
--with-http_auth_request_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_mp4_module \
--with-http_random_index_module \
--with-http_realip_module \
--with-http_secure_link_module \
--with-http_slice_module \
--with-http_ssl_module \
--with-http_stub_status_module \
--with-http_sub_module \
--with-http_v2_module \
--with-mail \
--with-mail_ssl_module \
--with-mail=dynamic \
--with-stream \
--with-stream=dynamic \
--with-stream_realip_module \
--with-stream_ssl_module \
--with-stream_ssl_preread_module \
--with-http_image_filter_module=dynamic \
--with-pcre-jit \
--add-module=../nginx_upstream_check_module
编译安装:
# 开始编译
make
# 安装
make install
查看版本信息:
nginx -V
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END




























![[PDF文件格式参考]PDF Reference 1.7-JoyCode 斑马快跑](https://qiniu.joycode.com.cn/2020/10/20201011222013698208.jpeg)