Yum Command detailed As is known to all, Redhat and Fedora's software installation commands are RPM, but the biggest trouble with using RPM to install the software is the need to manually find the series of dependencies needed to install the software, which is super hassle. If the software does not need to uninstall it is very annoying to unload a dependency and cause other software to not be used. Happily, Fedora has finally rolled out an apt command yum similar to Ubuntu, making Fedora's software installation easy. Yum has a feature: * Multiple resource pools can be configured at the same time (Repository) * Concise configuration file (/etc/yum.conf) * Automatically resolve the dependency problems encountered when adding or removing RPM packages * Easy to use * Maintain consistency with the RPM database yum.conf File instance: [main] Cachedir=/var/cache/yum debuglevel=2 Logfile=/var/log/yum.log Pkgpolicy=newest Distroverpkg=fedora-release tolerant=1 exactarch=1 [fedora-us-1] Name=fedora Core 1--Fedora US Mirror Baseurl=ftp://mirrors.kernel.org/fedora.us/fedora/fedora/1/i386/yum/os [fedora-us-1-updates] Name=fedora Core 1 Updates--Fedora US Mirror baseurl=ftp://mirrors.kernel.org/fedora.us/fedora/fedora/1/i386 /yum/updates [fedora-us-1-stable] Name=fedora Linux (Stable) for Fedora Core 1--Fedora US mirror BaseURL =ftp://mirrors.kernel.org/fedora.us/fedora/fedora/1/i386/yum/stable [Freshrpms] Name=Fedora Linux $ releasever-$basearch-freshrpms baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/ Freshrpms 1. Use Yum to find packages Command: Yum Search 2. List all installable packages Command: Yum list 3. List all updatable packages Command: Yum list updates 4. List all installed packages Command: Yum List installed 5. List all packages that are installed but not in Yum Repository Command: Yum list extras 6. List the packages that you specify Command: Yum list 7. Use Yum to get package information Command: Yum Info 8. List information for all packages Command: Yum Info 9. List all updatable package information Command: Yum info updates 10. List all installed package information Command: Yum info installed 11. List all package information that has been installed but not in Yum Repository Command: Yum info extras 12. List which files the package provides Command: Yum provides 5. Clear Yum Cache Yum will store the downloaded packages and headers in the cache and not automatically delete them. If we feel that they are taking up disk space, you can use the Yum Clean command for cleanup, more precise usage is yum clean headers clear Header,yum Clean Packages erase downloaded RPM package, yum clean all clears all 1. Clear the package under the cache directory (/var/cache/yum) Command: Yum Clean packages 2. Clear the Cache directory (/var/cache/yum) under the headers Command: Yum Clean headers 3. Clear Cache Directory (/var/cache/yum) under the old headers Command: Yum clean oldheaders 4. Clear the Cache directory (/var/cache/yum) under the package and the old headers Command: Yum clean, yum clean all (= Yum clean packages; yum clean oldheaders) The use of all of the above command parameters can be viewed in man: * Yum plugin * Presto plug-in Presto plugin provides Fedora users with faster download speeds and minimizes download files: It downloads only the difference files after the RPM package upgrade instead of the entire RPM package. The Presto plugin is included in Fedora 11 in ofedora_firefoxicially (Fedora official and has Firefox support.) ), I recommend the use of. Note that if you install an N version of the RPM package and you do not have the N+1 version installed, the Presto plugin will not be able to upgrade directly to the n+2 version. In this case, you must download the n+2 version of RPM. But it's not a big deal, Yum will take care of everything. Install the Presto plug-in, please open the terminal, enter:
Yum Install Yum-presto
* Fastest Mirroring plugin As the plugin name says, this plugin can search for the fastest mirror server in your mirrored list and download packages from it. To install, please enter:
Yum Install Yum-fastestmirror
Now, use it like you normally use Yum. You can configure the various settings for this plugin in the following file:
Gedit/etc/yum/pluginconf.d/fastestmirror.conf
* Security plugin This plugin only allows you to search and install only security-related upgrades, and it is useful if you install Fedora in the server's productivity model. To install, please enter:
Yum Install yum-security
To apply security Plug-ins, enter:
Yum--security Update
To learn more or to report additional options or advisory information to Bugzilla, please read the manual:
Mans yum-security
* Allow degraded plug-ins Yum The default is not to allow you to downgrade a package, but sometimes the new version of the problem for you. In this case you can use this plugin to downgrade the software to the previous stable version. To install, please enter: Yum Install Yum-allowdowngrade
To use it, enter:
Yum Update--allow-downgrade
You can disable the plugin by changing the options that are enabled in the following file:
Gedit/etc/yum/pluginconf.d/allowdowngrade.conf
Five. Yum Application Note: When an update is used for the first time using the Yum or Yum Repository, Yum automatically downloads all required headers placed in the/var/cache/yum directory, which may take a long time.
Check for updatable RPM packages #yum check-update
Install the RPM package so that Xmms can play mp3 #yum Install Xmms-mp3
Install MPlayer and automatically install related software #yum Install MPlayer
Delete the Licq package and delete the package that is dependent on the package #yum Remove Licq Note: At the same time will be prompted to delete licq-gnome,licq-qt,licq-text, very convenient
System Update (update all RPM packages that can be upgraded, including kernel) #yum-y Update
Perform periodic system updates on a daily basis #chkconfig Yum on #service Yum Start
Seven. Secure update of Freshrpms.net RPM package Install the Freshrpms.net GPG key #rpm--import Http://freshrpms.net/packages/RPM-GPG-KEY.txt
Edit/etc/yum.conf, add the following information to the tail [Freshrpms] Name=fedora Linux $releasever-$basearch-freshrpms baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms Gpgcheck=1
Note: Check GPG Key # Rpm-qa gpg-pubkey*
Show key Information #rpm-qi GPG-PUBKEY-E42D547B-3960BDF1
Delete key #rpm-E Gpg-pubkey-e42d547b-3960bdf1
= = Set Unofficial Update Source = = =
The following is an example of installing the Rpmforge package to add an unofficial update source.
-Find packages that apply to Rhel5/centos5 to http://dag.wieers.com/rpm/packages/rpmforge-release/ -Download Packages for RHEL5/CENTOS5 <code> # wget Http://dag.wieers.com/rpm/packag ... 6-1.el5.rf.i386.rpm # RPM-IVH rpmforge-release-0.3.6-1.el5.rf.i386.rpm # RPM--import/etc/pki/rpm-gpg/rpm-gpg-key-rpmforge-* </code>
You can see/etc/yum.repos.d/rpmforge.repo files after you install the Rpmforge-release package. Use Yum later to use this update
The source. You can also add DAG warehouses by using the manual method below.
Establish Dag.repo, define unofficial libraries:
# Vi/etc/yum.repos.d/dag.repo
<code> [Dag] Name=dag RPM Repository for Red Hat Enterprise Linux baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag Gpgcheck=1 Enabled=1 Gpgkey=http://dag.wieers.com/packages/rpm-gpg-key.dag.txt </code> </note>
= = = Use Yum Extension Yum-fastestmirror = = = = =
When a warehouse configuration file (*.repo) uses mirrorlist or specifies multiple URLs in BaseURL, Yum-fastestmirror can automatically select the fastest mirror
Site. To speed up the download using Yum-fastestmirror, install it using the following command.
# yum-y Install Yum-fastestmirror
The Yum-fastestmirror configuration file is/etc/yum/pluginconf.d/fastestmirror.conf and is not normally modified.
|