Monday, May 24, 2010

How to Update PHP

For most, using RPM as a package manager, If you upgrade/install php you will see a lot of dependecy errors and all, which is quite annoying. So plese Follow the below steps to make it easy.

I. If PHP is installed in your system then remove it. Put this in a script or from shell.
# for i in `rpm -qa|grep -i php`; do rpm -e $i --nodeps; done

II. rpm -ivh php52-common-5.2.13-1.el5.x86_64.rpm php52-cli-5.2.13-1.el5.x86_64.rpm php52-5.2.13-1.el5.x86_64.rpm

Now if you do "php -v" you can see the version of PHP.

Hope it will be helpful to all of you.

Wednesday, May 19, 2010

How to prepare a custom Kickstart CD

Creating a custom Kickstart CD for Red Hat

This article explains how to create a custom boot CD for Red Hat Enterprise Linux containing a customized Kickstart file. When completed, the boot CD will contain all of the instructions necessary to create a custom Red Hat Linux system with little or no intervention.

Step By Step

1. Place Disk 1 of the Red Hat Enterprise Linux CD set into the CDROM drive.

2. Navigate to the /images directory on the CD.

3. Locate the boot.iso file and copy it to your hard drive.

4. Mount the boot.iso file using the following command:

mount -o loop -t iso9660 boot.iso /mnt/iso

If the /mnt/iso directory does not already exist you will need to create it. You also may need to be the root user to mount the boot.iso file.

5. Change to the /mnt/iso directory and copy the contents to another location (we are using /home/jeff in this example):

cd /mnt/iso
cp -R isolinux /home/jeff

6. Copy the Kickstart ks.cfg file to the new directory (this presumes ks.cfg is already located in /home/jeff):

cd /home/jeff
cp ks.cfg ./isolinux

7. Change to the /isolinux directory:

cd isolinux

8. Run the following command to create a new .iso file:

mkisofs -r -T -J -V "RedHatKSBoot" -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -v -o /home/jeff/redhat_ks_boot.iso .

This will create a file named redhat_ks_boot.iso located in /home/jeff. It will be the same as the original boot.iso file we started with, with the exception of the ks.cfg file that was added.

9. Burn the redhat_ks_boot.iso file to a CD.
Initiating Kickstart

Boot the box on which you wish to install this customized version of Red Hat Enterprise Linux. At the boot: prompt, type the following:

linux ks=cdrom:/ks.cfg

Red Hat should then begin its boot process. You will then be prompted with the following message:

The Red Hat Enterprise Linux CD was not found in any of your CDROM drives.
Please insert the Red Hat Enterprise Linux CD and press OK to retry.

Replace the custom boot CD with Disk 1 of the Red Hat Enterprise Linux disk set and press OK. The Kickstart process will now take over and install Red Hat as per the instructions contained in ks.cfg.