User Guide - yum
- 10/03/2008 2:39 PM
Applicable Plans: All Standard VPS plans, all Advanced VPS plans, all Premier VPS plans (CentOS 5 plans)
yum is a package manager for RPM based systems. It can be used to install, remove and update packages on a system using one or more repositories. One of the advantages of yum is it's ability to automatically resolve dependencies when a package is installed. Since your VPS is a RPM based system (Centos) it is possible to take advantage of yum. This is a basic guide for yum. Please see the Links to Other Information section for links to external help.
WARNING! The applications that are offered and supported by eApps must be updated using your Control Panel. Please do not try to update them using yum.
Requirements
yum must be installed in your VPS subscription. This can be done by selecting it when you order the eApps VPS hosting service or by installing it using the Control Panel after the service has been provisioned. To see if yum is already installed log in to your Control Panel and click on the All Applications icon. If it is not in the installed list, you can install it by clicking on the Add Application icon from the System tab and selecting yum then clicking Next.
Configuration Files and Directories
/etc/yum.conf - This is the main yum configuration file. In this file you can put several configurations such as repositories and includes to configurations stored in another location on the system.
/etc/yum - Directory that can be used to store extra configurations.
/etc/yum.repos.d - The directory where Yum repositories not defined in /etc/yum.conf are stored.
/etc/yum.repos.d/CentOS-Base.repo - The configuration file for the Centos repositories.
Default Configuration
After installation, yum is configured to use the eApps Centos 5 repository for the base and updates of Centos 5 packages. The addons, extras and centosplus repositories are still available pulling from their external Centos 5 mirrors. eApps has also configured yum to exclude (/etc/yum/eapps-excludes) packages that we provide through the control panel.
Using Yum to Install, Update and Remove packages
Example - install nano: If you want to install the nano text editor you will execute " yum install nano" as follows.
-bash-3.1# yum install nano
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
extras 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
base 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
Excluding Packages in global exclude list
Finished
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for nano to pack into transaction set.
nano-1.3.12-1.1.i386.rpm 100% |=========================| 11 kB 00:00
---> Package nano.i386 0:1.3.12-1.1 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
nano i386 1.3.12-1.1 base 476 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 476 k
Is this ok [y/N]: Y
Downloading Packages:
(1/1): nano-1.3.12-1.1.i3 100% |=========================| 476 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: nano ######################### [1/1]
Installed: nano.i386 0:1.3.12-1.1
Complete!
Example - Update nano: To check and update nano you can execute "yum update nano" as shown below. The output below indicates that the latest version available in the repository is already installed. If a new version was available the process will look similar to a install except it will say "Update 1 Package(s)" in the Transaction Summary.
-bash-3.1# yum update nano
Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
extras 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
base 100% |=========================| 951 00:00
addons 100% |=========================| 951 00:00
Reading repository metadata in from local files
Excluding Packages in global exclude list
Finished
Could not find update match for nano
No Packages marked for Update/Obsoletion
Lastly you can uninstall nano by executing "yum remove nano" like I did below.
-bash-3.1# yum remove nano
Loading "installonlyn" plugin
Setting up Remove Process
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package nano.i386 0:1.3.12-1.1 set to be erased
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Removing:
nano i386 1.3.12-1.1 installed 1.3 M
Transaction Summary
=============================================================================
Install 0 Package(s)
Update 0 Package(s)
Remove 1 Package(s)
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Removing : nano ######################### [1/1]
Removed: nano.i386 0:1.3.12-1.1
Complete!
Links to Other Information
Centos yum Guide - http://www.centos.org/docs/5/html/yum/
Fedora wiki - http://fedoraproject.org/wiki/Docs/Drafts/SoftwareManagementGuide
yum project home page - http://linux.duke.edu/projects/yum/