REGISTER MY SYSTEM WITH RHN
To register your system with RHN type the following command and just follow on screen instructions (CentOS user skip to next step):
# rhn_register
Display list of updated software (security fix)
Type the following command at shell prompt:
# yum list updates
PATCH UP SYSTEM BY APPLYING ALL UPDATES
To download and install all updates type the following command:
# yum update
LIST ALL INSTALLED PACKAGES
List all installed packages, enter:
# rpm -qa
# yum list installed
Find out if httpd package installed or not, enter:
# rpm -qa | grep httpd*
# yum list installed httpd
CHECK FOR AND UPDATE SPECIFIED PACKAGES
# yum update {package-name-1}
To check for and update httpd package, enter:
# yum update httpd
SEARCH FOR PACKAGES BY NAME
Search httpd and all matching perl packages, enter:
# yum list {package-name}
# yum list {regex}
# yum list httpd
# yum list perl*
Sample output:
Loading "installonlyn" plugin Loading "security" plugin Setting up repositories Reading repository metadata in from local files Installed Packages perl.i386 4:5.8.8-10.el5_0.2 installed perl-Archive-Tar.noarch 1.30-1.fc6 installed perl-BSD-Resource.i386 1.28-1.fc6.1 installed perl-Compress-Zlib.i386 1.42-1.fc6 installed perl-DBD-MySQL.i386 3.0007-1.fc6 installed perl-DBI.i386 1.52-1.fc6 installed perl-Digest-HMAC.noarch 1.01-15 installed perl-Digest-SHA1.i386 2.11-1.2.1 installed perl-HTML-Parser.i386 3.55-1.fc6 installed ..... ....... .. perl-libxml-perl.noarch 0.08-1.2.1 base perl-suidperl.i386 4:5.8.8-10.el5_0.2 updates
INSTALL THE SPECIFIED PACKAGES [ RPM(S) ]
Install package called httpd:
# yum install {package-name-1} {package-name-2}
# yum install httpd
REMOVE / UNINSTALL THE SPECIFIED PACKAGES [ RPM(S) ]
Remove package called httpd, enter:
# yum remove {package-name-1} {package-name-2}
# yum remove httpd
Display the list of available packages
# yum list all
DISPLAY LIST OF GROUP SOFTWARE
Type the following command:
# yum grouplist
Output:
Installed Groups: Engineering and Scientific MySQL Database Editors System Tools Text-based Internet Legacy Network Server DNS Name Server Dialup Networking Support FTP Server Network Servers Legacy Software Development Legacy Software Support Development Libraries Graphics Web Server Ruby Printing Support Mail Server Server Configuration Tools PostgreSQL Database Available Groups: Office/Productivity Administration Tools Beagle Development Tools GNOME Software Development X Software Development Virtualization GNOME Desktop Environment Authoring and Publishing Mono Games and Entertainment XFCE-4.4 Tomboy Java Java Development Emacs X Window System Windows File Server KDE Software Development KDE (K Desktop Environment) Horde Sound and Video FreeNX and NX News Server Yum Utilities Graphical Internet Done
INSTALL ALL THE DEFAULT PACKAGES BY GROUP
Install all 'Development Tools' group packages, enter:
# yum groupinstall "Development Tools"
UPDATE ALL THE DEFAULT PACKAGES BY GROUP
Update all 'Development Tools' group packages, enter:
# yum groupupdate "Development Tools"
REMOVE ALL PACKAGES IN A GROUP
Remove all 'Development Tools' group packages, enter:
# yum groupremove "Development Tools"
INSTALL PARTICULAR ARCHITECTURE PACKAGE
If you are using 64 bit RHEL version it is possible to install 32 packages:
# yum install {package-name}.{architecture}
# yum install mysql.i386
DISPLAY PACKAGES NOT INSTALLED VIA OFFICIAL RHN SUBSCRIBED REPOS
Show all packages not available via subscribed channels or repositories i.e show packages installed via other repos:
# yum list extras
Sample output:
Loading "installonlyn" plugin Loading "security" plugin Setting up repositories Reading repository metadata in from local files Extra Packages DenyHosts.noarch 2.6-python2.4 installed VMwareTools.i386 6532-44356 installed john.i386 1.7.0.2-3.el5.rf