实验主机为server2
一、在官网下载nginx-1.18.0.tar.gz到/root下然后安装软件
[root@server2 ~]# tar xf nginx-1.18.0.tar.gz [root@server2 ~]# cd nginx-1.18.0/ -------------------------------------------------------------------------------------- [root@server2 nginx-1.18.0]#./configure --prefix=/usr/local/nginx --with-http_ssl_module checking for OS + Linux 4.18.0-80.el8.x86_64 x86_64 checking for C compiler ... not found ./configure: error: C compiler cc is not found ##显示需要安装gcc -------------------------------------------------------------------------------------- [root@server2 nginx-1.18.0]# dnf install -y gcc [root@server2 nginx-1.18.0]#./configure --prefix=/usr/local/nginx --with-http_ssl_module option, or install the PCRE library into the system, or build the PCRE library statically from the source with nginx by using --with-pcre=<path> option. ######显示需要安装pcre-devel -------------------------------------------------------------------------------------- [root@server2 nginx-1.18.0]# dnf install -y pcre-devel [root@server2 nginx-1.18.0]#./configure --prefix=/usr/local/nginx --with-http_ssl_module ./configure: error: SSL modules require the OpenSSL library. You can either do not enable the modules, or install the OpenSSL library into the system, or build the OpenSSL librar