How to install and uninstall software using Yum in CentOS


When installing a software

yum -y install httpd

When installing multiple similar software

yum -y install httpd*

When installing multiple non similar software

yum -y install httpd php php-gd mysql

When uninstalling a software

yum -y remove httpd

Uninstall multiple similar software

yum -y remove httpd*

When uninstalling multiple non similar software

yum -y remove httpd php php-gd mysql

There is another great usage

If I want to execute iostat to check the status of CPU and storage devices, but I find that there is no such command

So execute Yum install iostat. The result is that the software cannot be found. Use the following measures to solve it

Use Yum search iostat to find the installation packages related to iostat,

If you want to install a program and only remember the name of a department, you can also use this measure to install it

yum search png |grep png

We can find the name of libpng we want to install