CentOS 7.9 安装 nginx-1.22.0( 二 )

八、nginx 配置使用源码安装方式,nginx的配置文件,通常会在  /usr/local/nginx/conf/nginx.conf  这个位置 , 可以通过 vi 或 vim 修改 。
# 打开配置文件vim /usr/local/nginx/conf/nginx.conf九、防火墙# 关闭防火墙systemctl stop firewalld# 开放3306端口命令firewall-cmd --zone=public --add-port=3306/tcp --permanent# 配置立即生效firewall-cmd --reload云主机需配置安全组(默认已放行,可省略)
在入方向规则,允许80放行

CentOS 7.9 安装 nginx-1.22.0

文章插图
十、问题记录错误:./configure: error: the HTTP rewrite module requires the PCRE library.
解决:安装pcre-devel:yum -y install pcre-devel
错误:./configure: error: the HTTP cache module requires md5 functions
from OpenSSL library. You can either disable the module by using –without-http-cache option, or install the OpenSSL library into the system, or build the OpenSSL library statically from the source with nginx by using –with-http_ssl_module –with-openssl= options.
解决:yum -y install openssl openssl-devel
错误:

推荐阅读