# 安装依赖
yum -y install gcc gcc-c++ pcre pcre-devel gd-devel openssl openssl-devel zlib zlib-devel
# 创建用户
useradd www
# 获取需要的nginx版本
wget http://nginx.org/download/nginx-1.16.0.tar.gz
tar xzf nginx-1.16.0.tar.gz -C /usr/local/src/
cd /usr/local/src/nginx-1.16.0/
# 指定参数
./configure –user=www –group=www –prefix=/usr/local/nginx –with-http_ssl_module –with-http_stub_status_module –with-http_gzip_static_module –with-http_v2_module –with-http_realip_module
make && make install
centos7 编译安装nginx
最新推荐文章于 2024-08-13 17:54:31 发布