fedora使用yum
Update on Apr. 11, 2014: The latest tools for upgrading Fedora is FedUp, please check How to upgrade Fedora 19 to Fedora 20 through the network.
2014年4月11日更新:用于升级Fedora的最新工具是FedUp,请检查如何通过网络将Fedora 19升级到Fedora 20 。
Please consider PreUpgrade for upgrading Fedora. This is the recommended method.
请考虑使用PreUpgrade升级Fedora。 这是推荐的方法。
This post makes a list of actions should be done to upgrade Fedora using yum. Please note that this is for experienced users only, if you are not sure what you are doing and what do these commands mean, please stop here and read the manuals first, or go to Fedora’s Wiki about upgrading Fediora using yum.
这篇文章列出了使用yum升级Fedora应当采取的措施。 请注意,这仅适用于有经验的用户,如果您不确定自己在做什么和这些命令的含义,请在此处停止并首先阅读手册,或访问Fedora的Wiki,了解有关使用yum升级Fediora的信息。
This post aims to be a general method, although we use Fedora 15 to Fedora 16 as the example. We configure and install grub2 as the bootloader.
尽管我们以Fedora 15至Fedora 16为例,但本文旨在成为一种通用方法。 我们将grub2配置并安装为引导加载程序。
干净的东西 (Clean Stuff)
It is a good time to remove packages we don’t use. These packages could be candidates for removal, but check to see whether you use them directly or if they are used by applications not backed by rpm packages.
现在是删除我们不使用的软件包的好时机。 这些软件包可以作为删除的候选对象,但是请检查是否直接使用它们,或者是否被不由rpm软件包支持的应用程序使用。
# package-cleanup --leaves
You can find orphaned packages (i.e. packages not in the repositories anymore). This will also show packages which have been partially uninstalled but where the “%postun” script failed.
您可以找到孤立的软件包(即不再位于存储库中的软件包)。 这还将显示已部分卸载但“%postun”脚本失败的软件包。
# package-cleanup --orphans
做升级 (Do the upgrade)
转到文本控制台并在3级运行 (Go to a text console and run in level 3)
ctrl + alt + F2
init 3
首先更新yum (Update yum first)
yum update yum
清除所有缓存的元数据和程序包 (Clean all cached meta data and packages)
yum clean all
导入新版本存储库的密钥 (Import the key for the newer version’s repository)
For Fedora 16, it is
对于Fedora 16,它是
rpm --import https://fedoraproject.org/static/A82BA4B7.txt
将安装的软件包集与可用的最新软件包同步 (Synchronizes the installed package set with the latest packages available)
yum --releasever=<release_number_you_want_to_sync_to> distro-sync
For upgrading Fedora 15 to Fedora 16:
要将Fedora 15升级到Fedora 16:
yum --releasever=16 --disableplugin=presto distro-sync
Double check the updated repositories after distro-sync
发行版同步后再次检查更新的存储库
yum repolist
更新群组 (Update groups)
yum groupupdate Base
List all other groups
列出所有其他组
yum grouplist
and also update them
并更新它们
yum groupupdate ALL GROUPS LISTED
使用grub2代替grub (Use grub2 instead of grub)
Make configuration for grub2
进行grub2的配置
/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
Install grub2
安装grub2
/sbin/grub2-install BOOTDEVICE
For example, to install grub2 on sda:
例如,要在sda上安装grub2:
/sbin/grub2-install /dev/sda
重置服务启动/停止优先级 (Reset services start/stop priorities)
cd /etc/rc.d/init.d; for f in *; do /sbin/chkconfig $f resetpriorities; done
立即重启系统 (Reboot the system now)
After reboot, you may see new kernel version on new Fedora version. For example, kernel 3.1.1 on Fedora 16
重新启动后,您可能会在新的Fedora版本上看到新的内核版本。 例如,Fedora 16上的内核3.1.1
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.1.1-1.fc16.x86_64 #1 SMP Fri Nov 11 21:47:56 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
翻译自: https://www.systutorials.com/upgrading-fedora-to-newer-version-with-yum/
fedora使用yum