nginx - 为什么 yum 在 RHEL7 上的 yum 更新上重新创建默认的 nginx 配置文件?
问题描述
我在 RHEL7 上通过 yum 包安装了 nginx。我将我的配置添加为
/etc/nginx/conf.d/my.conf
并删除了包装附带的配置文件
/etc/nginx/conf.d/default.conf
最近,通过 yum update 更新了 nginx 包。现在,default.conf 文件再次出现。我本来希望 yum 不会触及默认配置文件,如果它们被更改或删除。
这是正常的百胜行为吗?这里有一些关于 RHEL 版本和 nginx 包的信息。
root@host: [~]# yum info nginx
Loaded plugins: langpacks, product-id, rhnplugin, search-disabled-repos
This system is receiving updates from RHN Classic or Red Hat Satellite.
Installed Packages
Name : nginx
Arch : x86_64
Epoch : 1
Version : 1.14.1
Release : 1.el7_4.ngx
Size : 2.6 M
Repo : installed
From repo : nginx
Summary : High performance web server
URL : http://nginx.org/
License : 2-clause BSD-like license
Description : nginx [engine x] is an HTTP and reverse proxy server, as well as
: a mail proxy server.
我将包从 1.14.0 升级到上面显示的 1.14.1 版本。
root@host: [~]# nginx -v
nginx version: nginx/1.14.1
红帽版本:
root@host: [~]# hostnamectl
Static hostname: host.example.com
Icon name: computer-vm
Chassis: vm
Machine ID: SOME-ID
Boot ID: ANOTHER-ID
Virtualization: vmware
Operating System: Red Hat Enterprise Linux
CPE OS Name: cpe:/o:redhat:enterprise_linux:7.5:GA:server
Kernel: Linux 3.10.0-862.14.4.el7.x86_64
Architecture: x86-64
如果我将 my.conf 重命名为 default.conf,它不会在 yum 更新时被替换。
解决方案
推荐阅读
- excel - 计算范围内每个重复项的出现次数并使用按钮在列表中汇总
- python - 其他语句中的 NaN
- docker - systemctl docker.service 设置未生效
- python-3.x - 使用列表理解的矩阵的行和、列和和对角线和。也摆脱错误:“TypeError:'int'对象不可迭代”
- javascript - 我们如何根据 React 侧边栏中的选项选择在主要部分显示不同的内容?
- android - 使用每个事件更新 Firebase Analytics 用户属性
- java - 如何将 UTC 时间戳转换为亚洲/雅加达时间
- go - 如何将 TestContext 传递给不接受 Gin 上下文作为参数的方法?
- flac - 使用mlt框架导出flac文件播放时间错误
- android - 属性返回与嵌套 RecyclerView.Adapter 中的实际资源不同的颜色 ID