≡ Menu

redhat

Patch and Update Redhat Enterprise Linux / CentOS 5 server

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

Sysadmin because even developers need heroes!!!

Q. I’m running Redhat Enterprise Linux 4.5 server along with Postfix and Cyrus mail server. However I’m getting following error in my log files:

Jun 10 18:00:04 server postfix/smtpd[7280]: sql_select option missing
Jun 10 18:00:04 server postfix/smtpd[7280]: auxpropfunc error no mechanism available

How do I fix this error? I’m not using mysql for postfix.

A. The cyrus software comes with various plugin. The cyrus-sasl-sql package contains the Cyrus SASL plugin which supports using a RDBMS for storing shared secrets.

If you are not using MySQL, just remove the plugin using rpm command:

# rpm -ev cyrus-sasl-sql

Note if you are using Debian or Ubuntu remove libsasl2-modules-sql package:
# apt-get remove libsasl2-modules-sql

Also on RHEL 3 / 4, make sure that file /etc/openldap/slapd.conf is owned by the user ldap:
# chown ldap.ldap /etc/openldap/slapd.conf

Other option is to configure the sql module. Now there should not be any sort of error in /var/log/messages or /var/log/maillog file.

Redhat Enterprise Linux (RHEL) install ImageMagick RPM for manipulating images

Q. How do I install ImageMagick software under Redhat enterprise Linux version 4 update 5?

A. ImageMagick is an image display and manipulation tool for the X Window System. ImageMagick can read and write JPEG, TIFF, PNM, GIF, and Photo CD image formats. It can resize, rotate, sharpen, color reduce, or add special effects to an image, and when finished you can either save the completed work in the original format or a different
one. ImageMagick also includes command line programs for creating animated or transparent .gifs, creating composite images, creating thumbnail images, and more.

ImageMagick is one of your choices if you need a program to manipulate and display images. If you want to develop your own applications which use ImageMagick code or APIs, you need to install ImageMagick-devel as well.

INSTALL ImageMagick

Use up2date command to install ImageMagick, enter ( <= RHEL 4 only): # up2date install ImageMagick
OR use yum if you are using Fedora Core/CentOS/RHEL 5:
# yum install ImageMagick

Essential ImageMagick Hacks/Tips/Faqs…

Now use ImageMagick from command line or GUI:

CentOS Linux Install and Configure NTP to Synchronize The System Clock

How do I install and configure NTP under CentOS Linux version 5.x or 6.x server to synchronize the system clock?
[click to continue…]

Install PHP 5 in Red Hat Enterprise Linux 5

Q. I saw your earlier article about how to install PHP 5 under Red Hat Enterprise Linux version 4. But I’m using Red Hat enterprise Linux 5 and I don’t want to mess up with old version instructions. Is there a way that I can install PHP5 under RHEL 5 without using source rpm?

A. Redhat Enterprise 5 supports PHP version 5 out of box. You can install PHP 5 using any one of the following method:

Method #1: Download and install php 5 from RHN

Type the following command to install php 5:
# yum install php
You may also want to install Apache and other php 5 extensions:
# yum install httpd php-gd php-mysql

Method #2: CD/DVD

Mount CD/DVD rom and use rpm command to install PHP5:
# rpm -ivh php*

Method #3: Use GUI package manager

Type the following command to start GUI package manager:
# system-config-package
Now Select PHP (under Web Servers) and install the same.

Where is My Linux GNU C or GCC Compilers Are Installed?

Where is my GNU C compiler? Where does the GNU C (gcc) compiler reside in the RHEL / Fedora / Debian / Ubuntu / CentOS Linux installation? How do I install GNU c/c++ compiler in Linux operating systems?
[click to continue…]

Where do I download Red Hat Enterprise Linux?

Q. Where do I download Red Hat Enterprise Linux?

A. Red Hat Enterprise Linux is not available for download. It is a commercial and supported Linux distribution.

Red Hat Network (RHN) (free registration required) has the trial version or demo version and you can download ISO images for Red Hat Enterprise Linux. After evaluation period you need to purchase support.

However I recommend downloading CentOS which is 100% Red Hat Enterprise Linux based free system. Another option is to try out Debian stable Linux.

You may also get free RedHat Enterprise Linux (RHEL) if you are leasing a server from dedicated hosting service providers.

HowTo: Linux Server Change OR Setup The Timezone

My Linux systems timezone is pointing to the wrong timezone. How do I setup or change the timezone under Linux operating systems?
[click to continue…]

Apply package updates from the Red Hat Network (RHN) For Red Hat Linux Server

Q. How do I apply package updates from the Red Hat Network (RHN)?
[click to continue…]

How Do I Find The Largest Top 10 Files and Directories On a Linux / UNIX / BSD?

How do I find the largest top files and directories on a Linux or Unix-like operating systems?
[click to continue…]