redhat 编译安装 nginx

旧街凉风 提交于 2020-11-10 06:47:47

学习一个东西,首先要看官网

http://nginx.org/en/linux_packages.html#RHEL-CentOS

 

一、安装编译工具、依赖包
# 主要安装 pcre-devel Nginx 需要
$ yum -y install gcc gcc-c++ autoconf automake
$ yum -y install zlib zlib-devel openssl openssl-devel pcre-devel


二、、编译安装nginx

2.解压: tar -zxvf nginx-1.14.0.tar.gz
3.配置: ./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-ipv6 
# j2 表示 2 个核心,可根据实际需求修改
4.安装: make -j2 & make install 

5. 重启 nginx

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!