CentOS yum command Using tutorials

  
 

Recently studying ContOS, yum is a command similar to apt-get under ubuntu. The following is a detailed introduction to the role and usage of yum.

What is yum

yum = Yellow dog Updater, The main function of Modified is to add/delete/update RPM packages more conveniently. It can automatically solve package dependencies. It can be easily managed. A large number of system update problems

yum features

You can configure multiple repository (Repository) concise configuration files at the same time (/etc/yum.conf automatically solves the problem of adding or removing rpm包s) Reliance issues are easy to use and maintain consistency with the RPM database

Google to some yum command parameters introduced, take a note!

1. List all updateable software inventory commands: Yum check-update

2. Install all update software commands: yum update

3. Install only the specified software commands: yum install <package_name>

4.Only Update the specified software command: yum update <package_name>

5. List all installable software list commands: yum list

Use YUM to install and remove software installed system add and remove software is Often, yum can also do this task, as long as the software is installed by rpm. The command to install is yum install xxx, yum will query the data. Whether there is this package, if there is, check its dependency conflict relationship, if there is no dependency conflict, then it is best to download and install; if there is, it will give a prompt asking if you want to install the dependency at the same time, or delete the conflict Package, you can make your own judgment. The command to delete is yum remove xxx. Like the installation, yum will also query the database and give hints for resolving dependencies. 1. Use YUM to install the package command: yum install <package_name>

2. Use YUM to remove the package command: yum remove <package_name>

Querying software information with YUM We often encounter such a situation, we want to install a software, only know it and Something is related, but you can't know exactly its name. At this time, yum's query function works. You can use the command yum search keyword to search, for example, we want to install an Instant Messenger, but I don't know exactly. What are the reasons, then you can use the yum search messenger to search, yum will search for all available rpm descriptions, list all descriptions related to messeger The rpm package, so we might get gaim, kopete, etc. and choose from them. Sometimes we will also encounter the installation of a package, but do not know its purpose, we can use the yum info packagename this command to get information. 1. Use YUM to find package commands: yum search <keyword>

2. List all installable package commands: yum list

3. List all updateable software Package command: yum list updates

4. List all installed package commands: yum list installed

5. List all package commands that are installed but not in Yum Repository: Yum list extras

6. List the specified package commands: yum list <package_name>

7.Use YUM to get package information command: yum info <package_name>

8. List information for all packages. Command: yum info

9. List all updateable package information commands: yum info updates

10. List all Installed package information command: yum info installed

11. List all package information commands that are installed but not in Yum Repository: yum info extras

12.List packages Which file commands are provided: yum provides <package_name>

Clearing the YUM cache yum will store the downloaded packages and headers in the cache without automatically deleting them. If we think that they take up disk space, you can use the yum clean command to clear, the more accurate usage is yum clean headers to clear the header, yum clean packages to clear the downloaded rpm package, yum clean all one brain 1. Clear the cache directory (/Package command under var/cache/yum): yum clean packages

2. Clear the headers command in the cache directory (/var/cache/yum): yum clean headers

3. Clear the old headers command in the cache directory (/var/cache/yum): yum clean oldheaders

4. Clear the package under the cache directory (/var/cache/yum) and the old headers command: yum Clean, yum clean all (= yum clean packages; yum clean oldheaders)

Copyright © Windows knowledge All Rights Reserved