在 Linux 中,使用 yum(Yellowdog Updater, Modified) 进行更新,常见于 CentOS 6/7、RHEL 6/7 等系统。下面是常用操作:
yum makecache
或
yum clean all
yum makecache
yum check-update
yum update
会提示是否继续,输入
y确认
yum update -y
yum update 软件名
例如:
yum update nginx -y
yum upgrade
或
yum upgrade -y
upgrade与update类似,但会更积极地处理依赖变更
yum update --security
或
yum update-minimal --security -y
yum install yum-cron -y
systemctl enable yum-cron
systemctl start yum-cron
yum clean all
yum makecache
这些系统已使用 dnf,命令类似:
dnf update -y
如果你能告诉我:
cat /etc/redhat-release)我可以给你更精确的命令。