The Yum command for Linux--(eight)

Source: Internet
Author: User

Yum (full name Yellow dog Updater, Modified) is a shell front end package Manager in Fedora and Redhat and CentOS. Based on RPM package management, the ability to automatically download RPM packages from specified servers and install them automatically handles dependency relationships and installs all dependent packages at once, without the hassle of downloading and installing them over and over again.

Yum syntax
[Options][command][package...]       
    • Options : optional, option includes-H (Help),-y (when the installation process prompts you to select all "Yes"),-Q (does not show the installation process), and so on.
    • command: the operation to be performed.
    • The object for the package operation.

Yum Common commands
    • 1. List all updatable software inventory commands: Yum check-update
    • 2. Update all software commands: Yum update
    • 3. Install only the specified software commands: Yum install <package_name>
    • 4. Update only the specified software commands: Yum update <package_name>
    • 5. List all installed software inventory commands: Yum list
    • 6. Remove Package Command: Yum remove <package_name>
    • 7. Find package Commands: Yum search <keyword>
    • 8. Clear the Cache command:
      • Yum Clean Packages: Clear the cache directory for packages
      • Yum Clean headers: Clear headers in cache directory
      • Yum Clean oldheaders: Clears the old headers from the cache directory
      • Yum Clean, yum clear all (= Yum packages; yum oldheaders): Clears the cache directory of the package and the old headers
Example 1

Installing Pam-devel

[email protected] ~]# Yum install pam-develsetting up Install processparsing PackageInstall argumentsresolving Dependencies<==Check the property dependencies of the software first-Running Transaction Check---> Package pam-devel.i386 0:0.99.6.2-4. El5 set to be updated--Processing Dependency:pam = 0.99.6.2-4.el5 for  Package: pam-devel-Running Transaction Check---> Package pam.i386 0:0.99.6.2-4. El5 set to be updatedfilelists.xml.gz100% |=========================| 1.6 MB 00:05filelists.xml.gz100% |=========================| 138 KB 00:00->finished Dependency Resolution ... (omitted)

Example 2

Remove Pam-devel

[email protected] ~]# Yum Remove pam-develsetting up Remove processresolving Dependencies<==In the same way, the problem of attribute dependencies is resolved first .-Running Transaction Check---> Package pam-devel.i386 0:0.99.6.2-4. El5 set to be erased-finished Dependency resolutiondependencies resolved=============================================================================Package Arch Version Repository Size=============================================================================Removing:pam-devel i386 0.99.6.2-4.el5 installed 495ktransaction Summary=============================================================================Install0Package (s) Update0Package (s) Remove1 package (s) <==Fortunately, there is no attribute dependency problem, simply remove a software is ThisOK [y/N]: ydownloading packages:running rpm_check_debugrunning Transaction testfinished Transaction testtransaction Test Succeededrunning Transaction Erasing:pam-devel ######################### [1/1]removed:pam-devel.i386 0:0.99.6.2-4. El5complete!
Example 3 use Yum to find out what software names start with Pam.
 [[email protected] ~]# yum list pam*installed packagespam.i386 
    0.99.6.2-3.27.el5 installedpam_ccreds.i386  3-5 installedpam_krb5.i386  2.2.14-1 instal           ledpam_passwdqc.i386  1.0.2-1.2.2 installedpam_pkcs11.i386  0.5.3-23 installedpam_smb.i386  1.1.7-7.2.1 installedavailable Packages  <== underneath is "upgradeable" or "Not Installed" pam.i386  0.99.6.2-4.el5 basepam -devel.i386 0.99.6.2-4.el5 basepam_krb5.i386  2.2.14-10 base 

Domestic Yum Source

NetEase (163) Yum Source is one of the best yum sources in the country, both speed and software version, are very good.

Setting the Yum source to 163 Yum can increase the speed of package installation and update, while avoiding the inability of some common software versions to be found.

The Yum command for Linux--(eight)

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.