≡ Menu

redhat

Update Centos Linux

How do I update Centos Linux 5 software and apply security patches?
[click to continue…]

Q. How do I enable and install Media player under CentOS or Fedora or Red Hat Enterprise Linux systems? How do I play mp3s under RHEL / CentOS Linux 5.x? How do I play CD / DVD movies under RHEL / CentOS Linux version 5.x?
[click to continue…]

Linux: pathmunge Command in Shell Script

Q. I see pathmunge used in few scripts under Red Hat Enterprise Linux. Can you explain the use of pathmunge under RHEL / CentOS / Fedora Linux?
[click to continue…]

How can I exclude selected packages when I rum yum update command under CentOS / RHEL / Fedora / Red Hat Enterprise Linux server?
[click to continue…]

Q. How can I create mpath devices for partitions under CentOS Linux 5?
[click to continue…]

Q. I’ve CentOS 5 server running on Dell hardware. I’m getting following error message in my /var/log/message file (some time message is also shown on console):

Jul 05 12:04:05 dell01 kernel: end_request: I/O error, dev fd0, sector 0
Jul 05 12:04:05 dell01 kernel: Buffer I/O error on device fd0, logical block 0
Jul 05 12:04:18 dell01 kernel: end_request: I/O error, dev fd0, sector 0
Jul 05 12:04:18 dell01 kernel: Buffer I/O error on device fd0, logical block 0
Jul 05 12:04:30 dell01 kernel: end_request: I/O error, dev fd0, sector 0
Jul 05 12:04:42 dell01 kernel: end_request: I/O error, dev fd0, sector 0

What do they mean? How do I fix this problem?

A. This message appears when you don’t have a floppy drive attached to Linux server. Solution is quite simple just disable driver for floppy and reboot the system. You can verify this with the following command (this solution works with RHEL, CentOS, Redhat, Ubuntu/Debian and other Linux distros) :
# lsmod | grep -i floppy
Output:

floppy                 95465  0

Open file called /etc/modprobe.d/blacklist:
# vi /etc/modprobe.d/blacklist
Listing a module (driver name) in this file prevents the hotplug scripts from loading it. Usually that'd be so that some other driver will bind it instead,
no matter which driver happens to get probed first. Sometimes user mode tools can also control driver binding. Append following line:
blacklist floppy
Save and close the file. Now reboot the Linux server:
# reboot

Q. Can you tell me how do I patch and update everything on my Redhat Enterprise Linux server 5?

A. Both RHEL 5 and CentOS 5 use yum command, which is an interactive, automated update program which can be used for maintaining systems using rpm.

To upgrade server and apply all security patches, pass update option to yum command. It will update every currently installed package. If one or more packages are specified, Yum will only update the listed packages. While updating packages, yum will ensure that all dependencies are satisfied. If no package matches the given package name(s), they are assumed to be a shell glob and any matches are then installed.

Task: Redhat / CentOS upgrade server and apply all security patches

In short type the following command, as the root user:
# yum update
OR if sudo is configured:
$ sudo yum update
Sample output:

Loading "rhnplugin" plugin
Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
rhel-x86_64-server-vt-5   100% |=========================| 1.2 kB    00:00
rhel-x86_64-server-5      100% |=========================| 1.2 kB    00:00
Reading repository metadata in from local files
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package kernel-devel.x86_64 0:2.6.18-8.1.8.el5 set to be installed
---> Package kernel-headers.x86_64 0:2.6.18-8.1.8.el5 set to be updated
---> Package kernel.x86_64 0:2.6.18-8.1.8.el5 set to be installed
--> Running transaction check
--> Populating transaction set with selected packages. Please wait.
---> Package kernel-devel.x86_64 0:2.6.18-8.el5 set to be erased
---> Package kernel.x86_64 0:2.6.18-8.el5 set to be erased
--> Running transaction check
Dependencies Resolved
=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 kernel                  x86_64     2.6.18-8.1.8.el5  rhel-x86_64-server-5   14 M
 kernel-devel            x86_64     2.6.18-8.1.8.el5  rhel-x86_64-server-5  4.7 M
Updating:
 kernel-headers          x86_64     2.6.18-8.1.8.el5  rhel-x86_64-server-5  762 k
Removing:
 kernel                  x86_64     2.6.18-8.el5     installed          72 M
 kernel-devel            x86_64     2.6.18-8.el5     installed          15 M
Transaction Summary
=============================================================================
Install      2 Package(s)
Update       1 Package(s)
Remove       2 Package(s)
Total download size: 20 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): kernel-devel-2.6.1 100% |=========================| 4.7 MB    00:04
(2/3): kernel-headers-2.6 100% |=========================| 762 kB    00:00
(3/3): kernel-2.6.18-8.1. 100% |=========================|  14 MB    00:12
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: kernel-devel                 ######################### [1/6]
  Updating  : kernel-headers               ######################### [2/6]
  Installing: kernel                       ######################### [3/6]
  Cleanup   : kernel-headers               ######################### [4/6]
  Cleanup   : kernel-devel                 ######################### [5/6]
  Cleanup   : kernel                       ######################### [6/6]
Removed: kernel.x86_64 0:2.6.18-8.el5 kernel-devel.x86_64 0:2.6.18-8.el5
Installed: kernel.x86_64 0:2.6.18-8.1.8.el5 kernel-devel.x86_64 0:2.6.18-8.1.8.el5
Updated: kernel-headers.x86_64 0:2.6.18-8.1.8.el5
Complete!

A note for RHEL 4 user

You need to use up2date command:
# up2date -u