Monday, September 3, 2007

apt-get install for RHEL4

apt-get installation for rhel4 (Update 4)
apt-get - APT package handling utility.

apt-get, that I use a lot that made my life easy going on Debian.So now using same on RHEL.This is how one can use apt-get on RHEL.

#rpm -ivvh

#vi /etc/apt/sorces.list.d/os.list (add following mirror )

repomd redhat/el4/en/x86_64/dag/

#apt-get update
#apt-cache search pkg
#apt-get install pkg
#apt-get remove pkg

partition using fdsik

fdsik ( Partition table manipulator for Linux )
(login with root privilege )

# fdisk /dev/device

# fdisk ( m help):m

# fdisk ( m help):p

# fdisk ( m help):n

# fdisk ( m help):w

inform the OS of partition table changes with following command

# partprobe (to sysnc partation table into kernel)

create an ext3 filesystem

# mkfs.ext3 -b 1049 /dev/device

fstab file
fstab is a configuration file that contains information of all the partitions and storage devices in your computer.

# vi /etc/fstab

Here's an example of the contents of /etc/fstab:

/dev/sda6 / ext3 errors=remount-ro 0 1
/dev/sda5 none swap sw 0 0
/dev/fd0 /floppy auto noauto 0 0
/dev/cdrom /cdrom iso9660 ro,noauto 0 0
/dev/sda12 /tmp ext3 defaults,nodev 0 2
/dev/sda13 /usr ext3 defaults 0 2
/dev/sda14 /home ext3 rw,auto,async,nouser,noexec,nodev,nosuid 0 2