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:192.168.0.254:/var/ftp/pub/ks.cfg

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

label 6
kernel rhel6/vmlinuz
append initrd=rhel6/initrd.img ks=nfs:192.168.0.254:/var/ftp/pub/rhel6/ks.cfg

Monday, April 11, 2011

Compression & Backup


gzip:
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)
or
#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)
or
#bzcat 1lakh.txt.bz2 |less
8.#bunzip2 1lakh.txt.bz2  (decompressing using bzip2)

Zip:
9.#zip 1lakh.txt.zip 1lakh.txt (compressing using zip)
10.#unzip 1lakh.txt.zip (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 special.save/ (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.

Step1:
Goto http://www.google.com/chrome/eula.html?platform=linux_fedora_i386 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.