{"id":2672,"date":"2014-04-01T18:37:25","date_gmt":"2014-04-01T18:37:25","guid":{"rendered":"http:\/\/blog.shineservers.com\/?p=2672"},"modified":"2014-04-01T18:37:25","modified_gmt":"2014-04-01T18:37:25","slug":"update-install-packages-redhat-enterprise-centos-linux-version-6-x","status":"publish","type":"post","link":"https:\/\/www.shineservers.com\/2014\/04\/01\/update-install-packages-redhat-enterprise-centos-linux-version-6-x\/","title":{"rendered":"Update \/ Install Packages Under Redhat Enterprise \/ CentOS Linux Version 6.x"},"content":{"rendered":"<p>How do I use yum command to update and patch my Red hat Enterprise Linux \/ CentOS Linux version 6.x server via RHN \/ Internet? Can I use up2date command under RHEL 6?<\/p>\n<p>up2date command\u00a0was part of RHEL v4.x or older version. You need to use yum command to update and patch the system using RHN or Internet. Use\u00a0<strong>yum command<\/strong>\u00a0to install critical and non-critical security updates as well as binary packages. Login as the root user to install and update the system.<\/p>\n<div><img decoding=\"async\" alt=\"\" src=\"http:\/\/c.cyberciti.biz\/cbzcache\/3rdparty\/centos_logo.png\" border=\"0\" \/><\/div>\n<h2>Task: Register my system with RHN<\/h2>\n<p>To register your system with RHN type the following command and just follow on screen instructions (CentOS user skip to next step):<br \/>\n<code># rhn_register<\/code><\/p>\n<h2>Task: Display list of updated software (security fix)<\/h2>\n<p>Type the following command at shell prompt:<br \/>\n<code># yum list updates<\/code><\/p>\n<h2>Task: Patch up system by applying all updates<\/h2>\n<p>To download and install all updates type the following command:<br \/>\n<code># yum update<\/code><\/p>\n<h2>Task: List all installed packages<\/h2>\n<p>List all installed packages, enter:<br \/>\n<code># rpm -qa<br \/>\n# yum list installed<\/code><\/p>\n<p>Find out if httpd package installed or not, enter:<br \/>\n<code># rpm -qa | grep httpd*<br \/>\n# yum list installed httpd<\/code><\/p>\n<h2>Task: Check for and update specified packages<\/h2>\n<p><code># yum update {package-name-1}<\/code><br \/>\nTo check for and update httpd package, enter:<br \/>\n<code># yum update httpd<\/code><\/p>\n<h2>Task: Search for packages by name<\/h2>\n<p>Search httpd and all matching perl packages, enter:<br \/>\n<code># yum list {package-name}<br \/>\n# yum list {regex}<br \/>\n# yum list httpd<br \/>\n# yum list perl*<\/code><br \/>\nSample output:<\/p>\n<pre>Loading \"installonlyn\" plugin\nLoading \"security\" plugin\nSetting up repositories\nReading repository metadata in from local files\nInstalled Packages\nperl.i386                                4:5.8.8-10.el5_0.2     installed\nperl-Archive-Tar.noarch                  1.30-1.fc6             installed\nperl-BSD-Resource.i386                   1.28-1.fc6.1           installed\nperl-Compress-Zlib.i386                  1.42-1.fc6             installed\nperl-DBD-MySQL.i386                      3.0007-1.fc6           installed\nperl-DBI.i386                            1.52-1.fc6             installed\nperl-Digest-HMAC.noarch                  1.01-15                installed\nperl-Digest-SHA1.i386                    2.11-1.2.1             installed\nperl-HTML-Parser.i386                    3.55-1.fc6             installed\n.....\n.......\n..\nperl-libxml-perl.noarch                  0.08-1.2.1             base\nperl-suidperl.i386                       4:5.8.8-10.el5_0.2     updates<\/pre>\n<h2>Task: Install the specified packages [ RPM(s) ]<\/h2>\n<p>Install package called httpd:<br \/>\n<code># yum install {package-name-1} {package-name-2}<br \/>\n# yum install httpd<\/code><\/p>\n<h2>Task: Remove \/ Uninstall the specified packages [ RPM(s) ]<\/h2>\n<p>Remove package called httpd, enter:<br \/>\n<code># yum remove {package-name-1} {package-name-2}<br \/>\n# yum remove httpd<\/code><\/p>\n<h2>Task: Display the list of available packages<\/h2>\n<p><code># yum list all<\/code><\/p>\n<h2>Task: Display list of group software<\/h2>\n<p>Type the following command:<br \/>\n<code># yum grouplist<\/code><br \/>\nOutput:<\/p>\n<pre>Installed Groups:\n   Engineering and Scientific\n   MySQL Database\n   Editors\n   System Tools\n   Text-based Internet\n   Legacy Network Server\n   DNS Name Server\n   Dialup Networking Support\n   FTP Server\n   Network Servers\n   Legacy Software Development\n   Legacy Software Support\n   Development Libraries\n   Graphics\n   Web Server\n   Ruby\n   Printing Support\n   Mail Server\n   Server Configuration Tools\n   PostgreSQL Database\nAvailable Groups:\n   Office\/Productivity\n   Administration Tools\n   Beagle\n   Development Tools\n   GNOME Software Development\n   X Software Development\n   Virtualization\n   GNOME Desktop Environment\n   Authoring and Publishing\n   Mono\n   Games and Entertainment\n   XFCE-4.4\n   Tomboy\n   Java\n   Java Development\n   Emacs\n   X Window System\n   Windows File Server\n   KDE Software Development\n   KDE (K Desktop Environment)\n   Horde\n   Sound and Video\n   FreeNX and NX\n   News Server\n   Yum Utilities\n   Graphical Internet\nDone<\/pre>\n<h2>Task: Install all the default packages by group<\/h2>\n<p>Install all &#8216;Development Tools&#8217; group packages, enter:<br \/>\n<code># yum groupinstall \"Development Tools\"<\/code><\/p>\n<h2>Task: Update all the default packages by group<\/h2>\n<p>Update all &#8216;Development Tools&#8217; group packages, enter:<br \/>\n<code># yum groupupdate \"Development Tools\"<\/code><\/p>\n<h2>Task: Remove all packages in a group<\/h2>\n<p>Remove all &#8216;Development Tools&#8217; group packages, enter:<br \/>\n<code># yum groupremove \"Development Tools\"<\/code><\/p>\n<h2>Task: Install particular architecture package<\/h2>\n<p>If you are using 64 bit RHEL version it is possible to install 32 packages:<br \/>\n<code># yum install {package-name}.{architecture}<br \/>\n# yum install mysql.i386<\/code><\/p>\n<h2>Task: Display packages not installed via official RHN subscribed repos<\/h2>\n<p>Show all packages not available via subscribed channels or repositories i.e show packages installed via other repos:<br \/>\n<code># yum list extras<\/code><br \/>\nSample output:<\/p>\n<pre>Loading \"installonlyn\" plugin\nLoading \"security\" plugin\nSetting up repositories\nReading repository metadata in from local files\nExtra Packages\nDenyHosts.noarch                         2.6-python2.4          installed\nVMwareTools.i386                         6532-44356             installed\njohn.i386                                1.7.0.2-3.el5.rf       installed\nkernel.i686                              2.6.18-8.1.15.el5      installed\nkernel-devel.i686                        2.6.18-8.1.15.el5      installed\nlighttpd.i386                            1.4.18-1.el5.rf        installed\nlighttpd-fastcgi.i386                    1.4.18-1.el5.rf        installed\npsad.i386                                2.1-1                  installed\nrssh.i386                                2.3.2-1.2.el5.rf       installed<\/pre>\n<h2>Task: Display what package provides the file<\/h2>\n<p>You can easily find out what RPM package provides the file. For example find out what provides the \/etc\/passwd file:<br \/>\n<code># yum whatprovides \/etc\/passwd<\/code><br \/>\nSample output:<\/p>\n<pre>Loading \"installonlyn\" plugin\nLoading \"security\" plugin\nSetting up repositories\nReading repository metadata in from local files\nsetup.noarch                             2.5.58-1.el5           base\nMatched from:\n\/etc\/passwd\nsetup.noarch                             2.5.58-1.el5           installed\nMatched from:\n\/etc\/passwd<\/pre>\n<p>You can use same command to list packages that satisfy dependencies:<br \/>\n<code># yum whatprovides {dependency-1} {dependency-2}<\/code><br \/>\nRefer yum command man page for more information:<br \/>\n<code># man yum<\/code><\/p>\n<h3 class=\"zemanta-related-title\" style=\"margin: 0 0 10px 0; padding: 0; clear: both;\">Related articles across the web<\/h3>\n<ul class=\"zemanta-article-ul zemanta-article-ul-image\" style=\"margin: 0; padding: 0; overflow: hidden;\">\n<li class=\"zemanta-article-ul-li-image zemanta-article-ul-li\" style=\"padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;\"><a style=\"padding: 2px; display: block; text-decoration: none;\" href=\"http:\/\/blog.shineservers.com\/optimise-tweak-high-traffic-servers\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;\" alt=\"\" src=\"http:\/\/i.zemanta.com\/238622182_150_150.jpg\" \/><\/a><a style=\"display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;\" href=\"http:\/\/blog.shineservers.com\/optimise-tweak-high-traffic-servers\/\" target=\"_blank\" rel=\"noopener noreferrer\">Optimise and Tweak High-Traffic Servers<\/a><\/li>\n<li class=\"zemanta-article-ul-li-image zemanta-article-ul-li\" style=\"padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;\"><a style=\"padding: 2px; display: block; text-decoration: none;\" href=\"http:\/\/blog.shineservers.com\/protect-apache-using-mod_security-on-rhelcentos-fedora\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;\" alt=\"\" src=\"http:\/\/i.zemanta.com\/239656353_150_150.jpg\" \/><\/a><a style=\"display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;\" href=\"http:\/\/blog.shineservers.com\/protect-apache-using-mod_security-on-rhelcentos-fedora\/\" target=\"_blank\" rel=\"noopener noreferrer\">Protect Apache using Mod_Security on RHEL\/CentOS &amp; Fedora<\/a><\/li>\n<li class=\"zemanta-article-ul-li-image zemanta-article-ul-li\" style=\"padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;\"><a style=\"padding: 2px; display: block; text-decoration: none;\" href=\"http:\/\/blog.shineservers.com\/linux-static-ip-address-configuration\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;\" alt=\"\" src=\"http:\/\/i.zemanta.com\/253498455_150_150.jpg\" \/><\/a><a style=\"display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;\" href=\"http:\/\/blog.shineservers.com\/linux-static-ip-address-configuration\/\" target=\"_blank\" rel=\"noopener noreferrer\">Linux Static IP Address Configuration<\/a><\/li>\n<li class=\"zemanta-article-ul-li-image zemanta-article-ul-li\" style=\"padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 104px; font-size: 12px; margin: 0 5px 10px 0;\"><a style=\"padding: 2px; display: block; text-decoration: none;\" href=\"http:\/\/blog.shineservers.com\/protect-apache-using-mod_evasive-rhelcentos-fedora\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" style=\"border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); padding: 0; margin: 0; border: 0; display: block; width: 100px; max-width: 100%;\" alt=\"\" src=\"http:\/\/i.zemanta.com\/239656351_150_150.jpg\" \/><\/a><a style=\"display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;\" href=\"http:\/\/blog.shineservers.com\/protect-apache-using-mod_evasive-rhelcentos-fedora\/\" target=\"_blank\" rel=\"noopener noreferrer\">Protect Apache using Mod_evasive on RHEL\/CentOS &amp; Fedora<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>How do I use yum command to update and patch my Red hat Enterprise Linux \/ CentOS Linux version 6.x server via RHN \/ Internet? Can I use up2date command under RHEL 6? up2date command\u00a0was part of RHEL v4.x or older version. You need to use yum command to update and patch the system using [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[60],"tags":[197],"class_list":["post-2672","post","type-post","status-publish","format-standard","hentry","category-linux","tag-update-and-install-packages-centos"],"acf":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/2672","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/comments?post=2672"}],"version-history":[{"count":0,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/2672\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/media?parent=2672"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/categories?post=2672"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/tags?post=2672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}