Linux: Package Manager Yum

Source: Internet
Author: User
Linux: Package Manager YumYum (all called YellowdogUpdater, Modified) is a Shell front-end package manager in Fedora, RedHat, SUSE, and CentOS. Based on RPM Package management, the RPM package can be automatically downloaded and installed from the specified server... 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 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 5. 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 rpm packages so that xmms can play mp3 # yum install xmms-mp3 to install mplayer, the related software is automatically installed at the same time. # yum install mplayer deletes the licq package and the dependent package is also deleted. # yum remove licq note: You will also be prompted to delete the licq-gnome, licq-qt, licq-text, which is very convenient for 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 is also upgraded # yum upgrade * rpm Package installation and removal 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. # yum list lists the specific rpm packages that can be installed, updated, and installed in the resource library. package # 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: you can use a match character in the rpm Package name, for example, listing all rpm packages starting with mozilla lists information about all the rpm packages that can be updated in the resource library # yum info updates lists information about all installed rpm packages # yum info installed list the rpm packages installed but not included 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. install the GPG key of freshrpms.net in the rpm Package of freshrpms.net safely # rpm -- import http://freshrpms.net/packages/RPM-GPG-KEY.txt Edit/etc/yum. conf and add the following information to the end: [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 * 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 to install updates and software online, but it is a paid feature of RHEL5. if you cannot use the RHEL5 update source when you do not buy 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 # counter list = http://mirrorlist.centos.org/?release= $ Releasever5 & arch = $ basearch & repo = OS # baseurl = http://mirror.centos.org/centos/ $ Releasever/OS/$ basearch/baseurl = http://ftp.sjtu.edu.cn/centos/5/os/ $ Basearch/gpgcheck = 0 gpgkey = http://mirror.centos.org/centos/ RPM-GPG-KEY-centos5 # released updates [update] name = CentOS-5-Updates # released list = http://mirrorlist.centos.org/?release= 4 & arch = $ basearch & repo = updatesbaseurl = http://ftp.sjtu.edu.cn/centos/5/updates/ $ Basearch/gpgcheck = 0 gpgkey = http://mirror.centos.org/centos/ RPM-GPG-KEY-centos5 # packages used/produced in the build but not released [addons] name = CentOS-5-Addons # History list = http://mirrorlist.centos.org/?release= 4 & arch = $ basearch & repo = addonsbaseurl = http://ftp.sjtu.edu.cn/centos/5/addons/ $ Basearch/gpgcheck = 0 gpgkey = http://mirror.centos.org/centos/ RPM-GPG-KEY-centos5 # additional packages that may be useful [extras] name = CentOS-5-Extras # sort list = http://mirrorlist.centos.org/?release= 4 & arch = $ basearch & repo = extrasbaseurl = http://ftp.sjtu.edu.cn/centos/5/extras/ $ Basearch/gpgcheck = 0 gpgkey = http://mirror.centos.org/centos/ RPM-GPG-KEY-centos5 # additional packages that extend functionality of existing packages [centosplus] name = CentOS-5-Plus # sort list = http://mirrorlist.centos.org/?release= 4 & arch = $ basearch & repo = centosplusbaseurl = http://ftp.sjtu.edu.cn/centos/5/centosplus/ $ Basearch/gpgcheck = 0 enabled = 0 gpgkey = http://mirror.centos.org/centos/ RPM-GPG-KEY-centos5 # contrib-packages by Centos Users [contrib] name = CentOS-5-Contrib # items list = http://mirrorlist.centos.org/?release= 4 & arch = $ basearch & repo = contribbaseurl = http://ftp.sjtu.edu.cn/centos/5/contrib/ $ Basearch/gpgcheck = 0 enabled = 0 gpgkey = http://mirror.centos.org/centos/ The RPM-GPG-KEY-centos5 # vi dag. repo [dag] name = Dag RPM Repository for RHEL5baseurl = http://ftp.riken.jp/Linux/dag/RedHat/el5/en/ $ Basearch/dag/enabled = 1 gpgcheck = 0 gpgkey = http://ftp.riken.jp/Linux/dag/packages/RPM-GPG-KEY.dag.txt Finally, execute yum update.
 
Related Article

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.