Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the common command yum in Linux

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article is to share with you about how to use the common command yum in Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Linux common commands yum (Yellow dog Updater, Modified) is a Shell front-end software package manager in Fedora and RedHat as well as SUSE

Based on RPM package management, RPM packages can be downloaded and installed automatically from designated servers, dependencies can be automatically dealt with, and all dependent software packages can be installed at one time without tedious downloading and installation.

Yum provides commands to find, install, and delete one, a group, or even all of the software packages, and the commands are concise and easy to remember.

The yum syntax yum [options] [command] [package.] * * options:** is optional, with options such as-h (help),-y (when prompted for "yes" during installation),-Q (does not show the installation process), and so on. * * the operation to be performed by command:**. * * the package name of the package:** installation. Yum common commands\ 1. Make a list of all updatable software commands: yum check-update 2. Update all software commands: yum update\ 3. Install only the specified software command: yum install\ 4. Update only the specified software command: yum update\ 5. Make a list of all installable software commands: yum list\ 6. Delete package command: yum remove\ 7. Find the package command: yum search\ 8. Clear cache command: yum clean packages: clear the package in the cache directory yum clean headers: clear the headersyum clean oldheaders in the cache directory: clear the old headersyum clean in the cache directory, yum clean all (= yum clean packages; yum clean oldheaders): clear the software package in the cache directory and the old headers instance 1

Install pam-devel

[root@www ~] # yum install pam-develSetting up Install ProcessParsing package install argumentsResolving Dependencies Running transaction check--- > Package pam-devel.i386 0vir 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 0vir 0.99.6.2-4.el5 set to be updatedfilelists.xml.gz 100% | = | 1.6 MB 00:05filelists.xml.gz 100% | = | 138 kB 0000-> Finished Dependency Resolution. (omitted) instance 2

Remove pam-devel

[root@www] # yum remove pam-develSetting up Remove ProcessResolving Dependencies Running transaction check--- > Package pam-devel.i386 0vir 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 495 kTransaction Summary====Install 0 Package (s) Update 0 Package (s) Remove 1 Package (s) # [1 pam-devel.i386 1] Removed: pam-devel.i386 0rig 0.99.6.2-4.el5Complete! Example 3

Use the features of yum to find out what software names start with pam?

[root@www] # 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 installedpam_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 domestic yum source

NetEase yum source is one of the best yum sources in China, both the speed and the software version are very good.

Setting the yum source to 163yum can speed up package installation and updates, while preventing some common software versions from being found.

Installation steps

Backup / etc/yum.repos.d/CentOS-Base.repo first

Mv / etc/yum.repos.d/CentOS-Base.repo / etc/yum.repos.d/CentOS-Base.repo.backup

Download the corresponding version of repo file and put it in / etc/yum.repos.d/ (please make a backup before operation)

CentOS5: http://mirrors.163.com/.help/CentOS5-Base-163.repoCentOS6: http://mirrors.163.com/.help/CentOS6-Base-163.repoCentOS7: http://mirrors.163.com/.help/CentOS7-Base-163.repowget http://mirrors.163.com/.help/CentOS6-Base-163.repomv CentOS6-Base-163.repo CentOS-Base.repo

Run the following command to generate the cache

Yum clean allyum makecache

In addition to NetEase, there are other good yum sources in China, such as China University of Science and Technology and Sohu.

Yum source of China University of Science and Technology, installation method View: https://lug.ustc.edu.cn/wiki/mirrors/help/centos

View the yum source installation method of sohu: http://mirrors.sohu.com/help/centos.html

Thank you for reading! This is the end of the article on "how to use yum in Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report