Nginx安装之源码安装

 

nginx部署

  1. 安装依赖

yum install gcc gccc++ pcre pcre-devel zlib zlib-devel openssl openssl-devel-y

  2. 下载nginx源码包

wget http://nginx.org/download/nginx-1.16.1.tar.gz

  3. 解压nginx

tar zxvf nginx-1.16.1.tar.gz

  4. 编译 安装nginx

cd nignx-1.16.1
./configure --prefix=/usr/local/nginx \
--with-http_dav_module \
--with-http_stub_status_module \
--with-http_addition_module \
--with-http_sub_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_ssl_module  \
--with-http_gzip_static_module \
--user=nginx \
--group=nginx
make&& make install

  5. 启动nginx

/usr/local/nginx/sbin/nginx 

  6. 验证(进程,端口)

 

 

转载于:https://www.cnblogs.com/llinux/p/11402770.html

你可能感兴趣的:(Nginx安装之源码安装)