Mount NFS filesystem in two different directories on same system
# mount -t nfs4 nfsserver:/data /home/data == First mount
# mount --bind /home/data /backup == Second Mount
# ls /backup /home/data == list both dirs

Linux: Find out which network card or NIC server is bind or running on

$ netstat -tulpn | grep :25

Red Hat Enterprise Linux how do I add a new hard disk for backup?
1 Make filesystem
#mkfs.ext3 /dev/hdX or mkfs.ext3 /dev/sdX : For ext3 file system
#mkfs.ext2 /dev/hdX or mkfs.ext3 /dev/sdX : For ext2 file system
# mkfs.ext3 /dev/sdb1

2.label the disk
e2label command will display or change the filesystem label on the ext2/3 filesystem located on device. General syntax is as follows:
e2label /dev/hdX /directory-name
e2label /dev/sdX /directory-name
# e2label /dev/sdb1 /databackup

3./etc/fstab - Add your partition here so that it can be automouted after reboot.
# echo "LABEL=/databackup /databackup ext3 defaults 1 2" >>/etc/fstab

How do I install an RPM package into a different directory?
# rpm --prefix=/home/chroot/ bind-chroot*.rpm
To check #rpm -qi chroot-bind

Task: Find full or half duplex speed
# dmesg | grep -i duplex
Output: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

# ethtool eth1
# mii-tool

#mpstat === status of all individual processors
ps - aux

Allow a normal user to run commands as root under Linux / UNIX operating systems


rokcy localhost=/sbin/halt
rokcy dbserver=/etc/init.d/apache-perl restart

Extract the rpm file
Extract RPM file using rpm2cpio and cpio command:
$ rpm2cpio php-5.1.4-1.esp1.x86_64.rpm | cpio -idmv

Uninstall files installed from a source code tar-ball
# make uninstall

Kernel compile steps

Step # 1 Get Latest Linux kernel code
Step # 2 Extract tar (.tar.bz3) file
Step # 3 Configure kernel
     $ make menuconfig
Step # 4 Compile kernel
     $ make
     $ make modules
     # make modules_install
Step # 5 Install kernel
     # make install

It will install three files into /boot directory as well as modification to your kernel grub configuration file:

Step # 6: Create an initrd image
     # cd /boot
     # mkinitrd -o initrd.img-2.6.23 2.6.23

Step # 7 Modify Grub configuration file - /boot/grub/menu.lst
# vi /boot/grub/menu.lst
title Debian GNU/Linux, kernel 2.6.23 Default
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hdb1 ro
initrd /boot/initrd.img-2.6.23
bootRemember to setup correct root=/dev/hdXX device. Save the file. If you think editing and writing all lines by hand is too much for you then try out update-grub command to update the lines for each kernel in /boot/grub/menu.lst file. Just type command:
# update-grub

Finally Reboot.......


Default Template for Easy Text To HTML Converter