安装 Nginx

安装编译环境 使 nginx 支持 http rewrite 模块/ssl 模块/ zlib

# yum -y install gcc gcc-c++ pcre pcre-devel openssl openssl-devel zlib zlib-devel gd gd-devel

创建用户 nginx

# useradd -s /sbin/nologin nginx

下载安装包并编译

# wget nginx-1.21.4.tar.gz
# tar -zxvf nginx.tar.gz
# cd nginx-1.21.4
# ./configure --prefix=/usr/local/nginx \
--user=nginx \
--group=nginx \
--with-pcre \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_realip_module \
--with-http_addition_module \
--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_random_index_module \
--with-http_secure_link_module \
--with-http_stub_status_module \
--with-http_auth_request_module \
--with-http_image_filter_module \
--with-http_slice_module \
--with-mail \
--with-threads \
--with-file-aio \
--with-stream \
--with-mail_ssl_module \
--with-stream_ssl_module
# make && make install
posted @ 2021-11-15 16:30  LiuChengloong  阅读(41)  评论(0编辑  收藏  举报