编译安装Nginx
- 官网下载编译安装包:nginx.org
- 解压缩
[root@apache ~]# tar xf nginx-1.18.0.tar.gz -C /usr/local/src/
[root@apache ~]# ls /usr/local/src/nginx-1.18.0/
[root@apache nginx-1.18.0]# pwd
/usr/local/src/nginx-1.18.0
[root@apache nginx-1.18.0]# man man/nginx.8 #查看nginx的man帮助
[root@apache nginx-1.18.0]# ./configure --help #编译时的各种内容选择
3)编译安装需要的软件
yum -y install gcc pcre-devel openssl-devel zlib-devel make
编译安装
./configure --prefix=/apps/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-h