环境
- centos7
nginx 1.16.1编译安装
## 安装依赖
yum -y install gcc pcre pcre-devel openssl openssl-devel zlib-devel gd perl perl-ExtUtils-Embed nginx-all-modules
## 创建用户和目录
groupadd www
useradd -g www -s /sbin/nologin -M www
mkdir /data/logs -p
## 解压编译安装
cd /usr/local/src
tar xf nginx-1.16.1.tar.gz ## 预先下载好源码包,官网有
cd nginx-1.16.1
./configure --prefix=/data/soft/nginx-1.16.1 --with-ipv6 --with-http_ssl_module \
--with-http_realip_module --with-http_addition_module --with-http_dav_module \
--with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module \
--with-http_perl_module --with-mail --with-mail_ssl_module
make && make install
相关文章
暂无评论...