Linux: Package Manager Yum

Source: Internet
Author: User
Tags delete key

Linux: Package Manager Yum (all called Yellow dog Updater, Modified) is a Shell front-end Package Manager in Fedora, RedHat, SUSE, CentOS. Based on RPM package management, the RPM package can be automatically downloaded and installed from the specified server, and the dependency relationship can be automatically processed. All dependent software packages can be installed at one time without tedious download and installation. The software package source available for Yum download includes the software package of Fedora and the Fedora Extras from rpmfusion and rpm.livna.org, which are all maintained by the Linux community and are basically free software. All packages have an independent GPG signature, mainly for your system security. For users of Fedora core 4.0, The rpm.livna.org signature is automatically imported and installed. The graphic front-end of the graphic front-end Yum mainly includes yumex and kyum. They are not independent of Yum, but the Yum graphics front-end. That is to say, they are both based on Yum installation and configuration while installing and using Yumex and kyum; therefore, you must install and configure Yum before using Yumex or kyum. Yum uses redhat, and Feder of fedora must have a headache for rpm's famous dependency hell (this is also a problem for all rpm-based releases ). Foo is needed by bar, bar is needed by foo. To load and unload a piece of software, we have to work hard to find out all the dependency problems. Several rpm search sites have become frequent places to patronize. If we encounter circular dependency, we will only have a dry eye. Sometimes you can add a -- nodeps parameter, but you may not see it. But can you ensure normal use of the software installed in this way? Can you uninstall the software without affecting the work of other software, i'm afraid no one can give a definite answer. At this moment, the hats only look at the apt of debian, secretly envy. Fortunately, these are all past tense. The rpm-based release now also has a package management tool that automatically resolves dependencies like apt. One of the famous ones is apt 4rpm, which is basically the transplantation of debian system apt in the rpm release version. But do you know the linuxer using Redhat and Fedora? There is also an rpm package management system similar to apt, that is, yum. The Fedora system has its own, and the Redhat has the corresponding rpm download. Compared with apt, yum features are not weak at all, and there are even many advantages over apt. For example, yum comes with the Fedora system, so it can use the official fedora software source to complete various official releases> various upgrades. Yum is not bad for third-party software sources. Most repository notes that support apt also support yum, such as freshrpms, fedora. us, and livna. In addition, yum has a detailed log to check when to upgrade and install software packages. The yum code is more streamlined than apt. I. what is yum? yum = Yellow dog Updater. The main function of Modified is to conveniently Add/delete/update RPM packages. it automatically solves the dependency problem of the package. it is easy to manage updates to a large number of systems. Note: The simplest reason for using yum instead of apt is that Fedora comes with two. yum features * multiple resource libraries (Repository) can be configured simultaneously * simple configuration file (/etc/yum. conf) * automatically solves the dependency problem when adding or deleting rpm packages * ease of use * Maintains consistency with the RPM database. yum installation Fedora comes with # rpm-ivh yum-2.0.4-2.noarch.rpm 4. yum configuration Note: Modify and add the resource library in the configuration file to accelerate the download speed and have more updatable rpm packages. replace all conf content with [main] cachedir =/var/cache/yum debuglevel = 2 log File =/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 (s Table) 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 = Limit five. yum application note: when you use the yum or yum resource library for updates for the first time, yum automatically downloads all required headers and stores them in the/var/cache/yum Directory, which may take a long time. check which update rpm packages are available # yum check-update install the rpm package so that xmms can play mp3 # Yum install xmms-mp3 to install mplayer, and automatic installation of the relevant software # yum install mplayer to delete the licq package, while deleting the package with dependency # yum remove licq note: you will also be prompted to delete licq-gnome, licq-qt, and licq-text to facilitate system updates (update all rpm packages that can be upgraded, including kernel) # yum-y update regularly executes system updates every day # chkconfig yum on # service yum start 6. yum command details * update check of the rpm package updatable rpm package # yum check-update all rpm packages # yum update the specified rpm package, for example, if you update a large-scale version upgrade of kernel and kernel source # yum update kernel-source, which is different from yum update, Even the old obsolete package also upgrade # yum upgrade * rpm package installation and deletion install rpm package, such as xmms-mp3 # yum install xmms-mp3 Delete rpm package, including the dependent package # yum remove licq Note: You will be prompted to delete the licq-gnome, licq-qt, licq-text * yum temporary storage (/var/cache/yum /) to clear the rpm file # yum clean packages to clear the rpm header file # yum clean headers to clear the old rpm header file # yum clean oldheaders to clear the old rpm header file and package file # yum clean or # yum clean all note: equivalent to yum clean packages + yum clean oldheaders * the rpm package list lists all the rpm packages that can be installed or updated in the resource library # y Um list lists specific rpm packages that can be installed or updated and installed in the resource library # yum list mozilla * Note: You can use a match character in the rpm package name, for example, listing all rpm packages starting with mozilla lists all the rpm packages that can be updated in the resource library # yum list updates lists all installed rpm packages # yum list installed lists installed but not rpm package contained in the resource library # yum list extras note: download and install the rpm package * rpm package information display from other websites (the info parameter is the same as the list) list information about all rpm packages that can be installed or updated in the resource library # yum info lists information about specific rpm packages that can be installed or updated and installed in the resource library # yum info mozilla # yum info mozilla * Note: match characters can be used in rpm package names, for example, to list all rp names starting with mozilla The m package information lists information about all the rpm packages that can be updated in the resource library # yum info updates lists information about all the installed rpm packages # yum info installed lists installed but not included rpm package information in the resource library # yum info extras note: download and install rpm packages from other websites * search for rpm packages matching specific characters # yum search mozilla note: In the rpm package name, search for an rpm package containing a specific file name in the package description. # yum provides realplay 7. secure update freshrpms.net rpm package install freshrpms.net GPG key # rpm -- import http://freshrpms.net/packages/RPM-GPG-KEY.txt edit/etc/yum. conf, add the following information to the end [freshrpms] name = F Edora Linux $ releasever-$ basearch-freshrpms baseurl = http://ayo.freshrpms.net/fedora/linux/?releasever/?basearch/freshrpms gpgcheck = 1 Note: check GPG Key # rpm-qa gpg-pubkey * display Key information # rpm-qi gpg-pubkey-e42d547b-3960bdf1 delete Key # rpm-e gpg-pubkey-e42d547b-3960bdf1 attachment: YUM is a tool for RedHat Linux Online installation updates and software, however, this is the charging function of RHEL5. If you cannot use the update source of RHEL5 when you have not purchased the Redhat service, you will be prompted to register it. Since CentOS is a free Linux version evolved from RedHat, you can use the CentOS yum update source to implement the RHEL5 YUM function. The configuration method is as follows: Check whether yum is installed. It is installed by default, with a total of 4 packages. [Root @ linux-a ~] # Rpm-qa | grep yumyum-metadata-parser-1.0-8.fc6yum-3.0.1-5.el5yum-rhn-plugin-0.4.3-1.el5yum-updatesd-3.0.1-5.el5 configure yum update source to create/etc/yum. repos. d/CentOS-Base.repo file, define yum update source, www.linuxidc.com here is the Shanghai Jiao Tong University CentOS update source [root @ linux-a ~] # Vi/etc/yum. repos. d/CentOS-Base.repo [base] name = CentOS-5-Base # Sort list = http://mirrorlist.centos.org /? Release = $ releasever5 & arch = $ basearch & repo = OS # baseurl = updated updates [update] name = CentOS-5-Updates # updated list = http://mirrorlist.centos.org /? Release = 4 & arch = $ basearch & repo = updatesbaseurl = eclipused/produced in the build but not released [addons] name = CentOS-5-Addons # pipeline list = http://mirrorlist.centos.org /? Release = 4 & arch = $ basearch & repo = addonsbaseurl = your packages that may be useful [extras] name = CentOS-5-Extras # Your list = http://mirrorlist.centos.org /? Release = 4 & arch = $ basearch & repo = extrasbaseurl = extends packages that extend functionality of existing packages [centosplus] name = CentOS-5-Plus # export list = http://mirrorlist.centos.org /? Release = 4 & arch = $ basearch & repo = centosplusbaseurl = bytes-packages by Centos Users [contrib] name = CentOS-5-Contrib # Sort list = http://mirrorlist.centos.org /? Release = 4 & arch = $ basearch & repo = contribbaseurl = drawing vi dag. repo [dag] name = Dag RPM Repository for RHEL5baseurl = merge finally execute yum update.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.