BKJIA Internet headlines in September 29, 2013: This article describes how to use the YUMYellowdog Updater Modified developed by RedHat to install, update, remove, and search software packages and manage software packages and libraries. The sample commands shown in this article are all tested on our CentOS 6.3 server. You can use these materials for learning and authentication, or just to figure out how to install new software packages, make sure the system version is up to date. The basic requirement in this article is that you need to have a basic understanding of these commands and a normal Linux operating system to explore and execute all the commands listed below.
What exactly is YUM?
YUMYellowdog Updater Modified is an open-source command line and graphical software package management tool for Linux systems based on RPM Red Hat Software Package Manager. It allows users and system administrators to easily install, update, remove, or search for software packages on the system. It is developed and released by Seth Vidal and adopts the GPL General Public License. It is an open source tool. This means that anyone can download and access the code to FIX software errors and develop customized software packages. YUM uses a large number of third-party software libraries to automatically install software packages by solving dependencies of software packages.
1. install the software package using Yum
To install a software package named Firefox 14, run the following command to automatically find and install all necessary dependencies of the Firefox browser.
- # yum install firefox
- Loaded plugins: fastestmirror
- Dependencies Resolved
- ==================================== Package Arch Version Repository Size
- ====================================
- Updating:
- firefox i686 10.0.6-1.el6.centos updates 20 M
- Updating for dependencies:
- xulrunner i686 10.0.6-1.el6.centos updates 12 M
- Transaction Summary
- ===========================================Install 0 Package(s)
- Upgrade 2 Package(s)
- Total download size: 32 M
- Is this ok [y/N]: y
- Downloading Packages:
- (1/2): firefox-10.0.6-1.el6.centos.i686.rpm | 20 MB 01:10
- (2/2): xulrunner-10.0.6-1.el6.centos.i686.rpm | 12 MB 00:52
- ------------------------------------------------------------------------------------------------
- Total 63 kB/s | 32 MB 02:04
- Updated:
- firefox.i686 0:10.0.6-1.el6.centos
- Dependency Updated:
- xulrunner.i686 0:10.0.6-1.el6.centos
- Complete!
The preceding Command requires confirmation before installing any software package on your system. If you do not require any confirmation, you can use option-y to automatically install the software package, as shown in the following example.
- # yum -y install firefox
2. Remove the software package using Yum
To completely remove the software package along with all dependencies, run the following command.
- # yum remove firefox
- Loaded plugins: fastestmirror
- Setting up Remove Process
- Resolving Dependencies
- --> Running transaction check
- ---> Package firefox.i686 0:10.0.6-1.el6.centos set to be erased
- --> Finished Dependency Resolution
- Dependencies Resolved
- ===========================================Package Arch Version Repository Size
- ===========================================Removing:
- firefox i686 10.0.6-1.el6.centos @updates 23 M
- Transaction Summary
- ===========================================
- Remove 1 Package(s)
- Reinstall 0 Package(s)
- Downgrade 0 Package(s)
- Is this ok [y/N]: y
- Downloading Packages:
- Running rpm_check_debug
- Running Transaction Test
- Transaction Test Succeeded
- Running Transaction
- Erasing:firefox-10.0.6-1.el6.centos.i686 1/1
- Removed:
- firefox.i686 0:10.0.6-1.el6.centos
- Complete!
Similarly, the preceding Command requires confirmation before removing the software package. To disable the confirmation prompt, just add option-y, as shown below.
- # yum -y remove firefox