在 centos 7 中编译安装 nginx
安装环境为:最小化安装的centos7。 开始安装nginx 1 2 3 4 5 6 7 8 9 10 11 创建群组 groupadd www 创建一个用户,不允许登陆和不创主目录 useradd -s /sbin/nologin -g www -M www #下载最新版nginx wget -C https://nginx.org/download/nginx-1.7.8.tar.gz tar zxvf nginx-1.7.8.tar.gz #编译基本能运行的nginx ./configure --user=www --group=www --prefix=/usr/local/nginx --with-https_stub_status_module --with-https_ssl_module --with-https_gzip_static_module make make install 如果有错误提示: ./configure: error: C compiler cc is not found 解决方法: 1 yum install gcc gcc-c++ 如果有错误提示: ./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable