Search for a Package using YUM
If you don’t remember the exact name of the package, then use search
function to search all the available packages to match the name of the
package you specified. For example, to search all the packages that
matches the word.
# yum search vsftpd
Get Information of a Package using YUM
Say you would like to know information of a package before installing
it.To get information of a package just issue the below command.
# yum info firefox
List all Available Packages using YUM
To list all the available packages in the Yum database, use the below command.
# yum list | less
List all Installed Packages using YUM
To list all the installed packages on a system, just issue below command, it will display all the installed packages.
# yum list installed | less
Yum Provides Function
Yum provides function is used to find which package a specific file
belongs to. For example, if you would like to know the name of the
package that has the /etc/httpd/conf/httpd.conf.
# yum provides /etc/httpd/conf/httpd.conf
Check for Available Updates using Yum
To find how many of installed packages on your system have updates available, to check use the following command.
# yum check-update
Update System using Yum
To keep your system up-to-date with all security and binary package
updates, run the following command. It will install all latest patches
and security updates to your system.
# yum update
List all available Group Packages
In Linux, number of packages are bundled to particular group. Instead
of installing individual packages with yum, you can install particular
group that will install all the related packages that belongs to the
group. For example to list all the available groups, just issue
following command.
# yum grouplist
Install a Group Packages
To install a particular package group, we use option as groupinstall.
Fore example, to install “MySQL Database“, just execute the below
command.
# yum groupinstall 'MySQL Database'
Update a Group Packages
To update any existing installed group packages, just run the following command as shown below.
# yum groupupdate 'DNS Name Server'
Remove a Group Packages
To delete or remove any existing installed group from the system, just use below command.
# yum groupremove 'DNS Name Server'
List Enabled Yum Repositories
To list all enabled Yum repositories in your system, use following option.
# yum repolist
List all Enabled and Disabled Yum Repositories
The following command will display all enabled and disabled yum repositories on the system.
# yum repolist all
Install a Package from Specific Repository
To install a particular package from a specific enabled or disabled
repository, you must use –enablerepo option in your yum command. For
example to Install PhpMyAdmin 3.5.2 package, just execute the command.
# yum --enablerepo=epel install phpmyadmin
Interactive Yum Shell
Yum utility provides a custom shell where you can execute multiple commands.
# yum shell
Clean Yum Cache
By default yum keeps all the repository enabled package data in
/var/cache/yum/ with each sub-directory, to clean all cached files from
enabled repository, you need to run the following command regularly to
clean up all the cache and make sure that there is nothing unnecessary
space is using. We don’t want to give the output of the below command,
because we like to keep cached data as it is.
# yum clean all
View History of Yum
To view all the past transactions of yum command, just use the following command.
# yum history
Comments
Post a Comment