Wednesday, April 20, 2011

User Quota Creation

Step1: #vim /etc/fstab
add usrquota in the /home partition after defaults,usrquota
Step2: #mount -o remount /home
Step3: #quotacheck -cf /home
Step4: #quotaon /home
Step5: #repquota /home
Step6: #edquota pna - edit the quota for the user pna ( give the soft and hard limitations)
Step7: #repquota /home (It will show the quota for the user pna)

Friday, April 15, 2011

Adding kickstart file in the remote boot screen itself

Edit the following file:

#vim /tftpboot/pxelinux.cfg/default

Add the follwoing line in the file:

label ks
kernel vmlinuz
append initrd=initrd.img ks=nfs:

Adding another OS in this file (example: rhel6):

label 6
kernel rhel6/vmlinuz
append initrd=rhel6/initrd.img ks=nfs:

Monday, April 11, 2011

Compression & Backup

1.#seq 100000 > 1lakh.txt (creating a file with the content 100000)
2.#gzip -c 1lakh.txt > 1lakh.txt.gz (compressing the file)
3.#gzip -l 1lakh.txt.gz  (showing the compression rate)
4.#gunzip 1lakh.txt.gz (uncompress the file)
5.#zcat 1lakh.txt.gz (view the content without decompressing)
#zcat 1lakh.txt.gz | less

bzip2: (best compression)
6.#bzip2 -c 1lakh.txt > 1lakh.txt.bz2 (compressing using algorithm bzip2)
7.#bzcat 1lakh.txt.bz2  (view the content without decompressing)
#bzcat 1lakh.txt.bz2 |less
8.#bunzip2 1lakh.txt.bz2  (decompressing using bzip2)

9.#zip 1lakh.txt (compressing using zip)
10.#unzip (uncompress the file)

Tar & Gzip, Bzip2 (Tape Drive Archieve or backup):
create a directory special and put some contents in that.
11.#tar -cvf myfile.tar special/ (taking backup)
12.#tar -cvf myfile.tar 1lakh.txt.gz (adding another file in the same tar)
13.#tar -czvf myfile.tar.gz special/ (creating tar & gzip together)
14.#tar -cjvf myfile.tar.bz2 special/ (creating tar & bzip2 together)
15.#tar -tzvf myfile.tar.gz (viewing the gzip without extraction)
16.#tar -cjvf myfile.tar.bz2 (viewing the files)
17.#tar -xvf myfile.tar.gz (extracting gzip file)
18.#tar -xvf myfile.tar.bz2 (extracting bzip2 file)

Tuesday, April 5, 2011

Google Chrome 10.0.648.204 works good in RHEL6

Google Chrome 10.0.648.204 works good in RHEL6.

Steps to install Google Chrome to RHEL 6.

Goto location

Step2: download the 32 bit .rpm (For Fedora/openSUSE) or 64 bit .rpm (For Fedora/openSUSE) with respect to your Operating System.

Step3: install the rpm by right clicking it.

Step4: Select the menu option as follows
Applications-> Internet -> Google Chorme.

Note: the rpm that is designed for Fedora and openSUSE works good for RHEL6 also.