tag:blogger.com,1999:blog-72848895880851890742024-02-18T18:00:33.063-08:00UINXAlok Singhhttp://www.blogger.com/profile/14612064356463719721noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-7284889588085189074.post-74864230331839160362011-02-28T03:00:00.000-08:002011-02-28T03:00:06.302-08:00LINUX Password Policy<div dir="ltr" style="text-align: left;" trbidi="on">cp /etc/pam.d/system-auth /etc/pam.d/system-auth.bak<br />
vi /etc/pam.d/system-auth<br />
password requisite pam_cracklib.so try_first_pass retry=3 minlen=10 lcredit=-1 ucredit=-1 dcredit=-1 ocredit=-1<br />
difok=3<br />
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok remember=26<br />
<br />
cp /etc/login.defs /etc/login.defs.bak<br />
vi /etc/login.defs<br />
PASS_MAX_DAYS 45<br />
PASS_MIN_DAYS 0<br />
PASS_MIN_LEN 10<br />
PASS_WARN_AGE 7<br />
<br />
<br />
chage -d 0 xyz<br />
chage -d 0 abc</div>Alok Singhhttp://www.blogger.com/profile/14612064356463719721noreply@blogger.com0tag:blogger.com,1999:blog-7284889588085189074.post-47789671003870643172011-02-28T02:54:00.000-08:002011-02-28T02:54:35.916-08:00LINUX LVExtend With Storage LUN Finding<div dir="ltr" style="text-align: left;" trbidi="on"><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/opt/dyDynamicLinkManager/bin/dlnkmgr -view -drvpath</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">Paths:000440 OnlinePaths:000440</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;"><span style="mso-spacerun: yes;"> </span>17746991<span style="mso-spacerun: yes;"> </span>0<span style="mso-spacerun: yes;"> </span>0 sddlmnk </span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">000439 0003.0000.0000000000000000.00DC HITACHI .OPEN-V <span style="mso-spacerun: yes;"> </span>.0048422<span style="mso-spacerun: yes;"> </span>001353<span style="mso-spacerun: yes;"> </span>4F<span style="mso-spacerun: yes;"> </span>Online<span style="mso-spacerun: yes;"> </span>Own<span style="mso-spacerun: yes;"> </span>5397754<span style="mso-spacerun: yes;"> </span>0<span style="mso-spacerun: yes;"> </span>0 sddlmnl </span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">KAPL01001-I The HDLM command completed normally. Operation name = view, completion time = 2010/07/30 12:58:13</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# /opt/DynamicLinkManager/bin/dlnkmgr view -path | grep 13:54</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">pwdlscd /usr/openv/netbackup/bin</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">\pwd./vmoprcmd -dlscd /usr/openv/volmgr/bin/</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">exitecho - - -> /sys/class/scsi_host/host1/scan</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# echo - - -> /sys/class/scsi_host/host1/scan</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# echo - - -> /sys/class/scsi_host/host2/scan</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# echo - - -> /sys/class/scsi_host/host3/scan</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# echo - - -> /sys/class/scsi_host/host4/scan</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# echo - - -> /sys/class/scsi_host/host5/scan</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# dlm</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">dlmcfgmgr<span style="mso-spacerun: yes;"> </span>dlmgetomtrace<span style="mso-spacerun: yes;"> </span>dlmguiinst.sh<span style="mso-spacerun: yes;"> </span>dlmmgr<span style="mso-spacerun: yes;"> </span>dlmsetopt<span style="mso-spacerun: yes;"> </span>dlmupdatesysinit<span style="mso-spacerun: yes;"> </span></span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">dlm_controld<span style="mso-spacerun: yes;"> </span>dlmgetras<span style="mso-spacerun: yes;"> </span>dlmguiuninst.sh<span style="mso-spacerun: yes;"> </span>dlmmkinitrd<span style="mso-spacerun: yes;"> </span>dlmstart<span style="mso-spacerun: yes;"> </span>dlmwebgui_setup.sh<span style="mso-spacerun: yes;"> </span></span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">dlmdlp<span style="mso-spacerun: yes;"> </span>dlmglcl<span style="mso-spacerun: yes;"> </span>dlminsadrv<span style="mso-spacerun: yes;"> </span>dlmrmadrv<span style="mso-spacerun: yes;"> </span>dlm_tool<span style="mso-spacerun: yes;"> </span></span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# dlmcfgmgr -r</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">KAPL10339-I This operation will change the configuration of HDLM devices. Do you want to continue? [y/n]: y</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">KAPL10341-I The HDLM device configurations have been changed.</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">KAPL10302-I /sbin/dlmcfgmgr completed normally.</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# dlmcfgmgr -r</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">KAPL10339-I This operation will change the configuration of HDLM devices. Do you want to continue? [y/n]: y</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">KAPL10302-I /sbin/dlmcfgmgr completed normally.</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# dlmcfgmgr -recho - - -></span></b><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;"> /sys/class/scsi_host/host5/scan4/scan3/scan2/scan1/scan5/scan4/scan3/scan2/scan1/scan5/scan4/scan3/scan2/scan1/scan5/scan4/scan3/scan2/scan1/scan5/scan4/scan3/scan2/scan1/scan5/scan4/scan3/scan2/scan1/scan</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/opt/DynamicLinkManager/bin/dlnkmgr view -path | grep 13:5654</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">df -hlscd binlscd /usr/openv/netbackup/</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">logoutbash./update_dbclients oracle -ClientList test12345O</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">cd ..more test12345 ./bpplclients -allunique -noheader > test12345</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">more test12345 cd .../update_dbclients Oracle -ClientList test12345o</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">bashlogoutcd /usr/openv/netbackup/</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">lscd binlsdf -h/opt/DynamicLinkManager/bin/dlnkmgr view -path | grep 13:54</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# /opt/DynamicLinkManager/bin/dlnkmgr view -path | grep 1354</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">PathID HDevName Device<span style="mso-spacerun: yes;"> </span>LDEV</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">000000 sddlmaa<span style="mso-spacerun: yes;"> </span>/dev/sda<span style="mso-spacerun: yes;"> </span>USP_V.0048422.002A20</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">000436 sddlmni<span style="mso-spacerun: yes;"> </span>/dev/sdpw USP_V.0048422.001350</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">000437 sddlmnj<span style="mso-spacerun: yes;"> </span>/dev/sdpx USP_V.0048422.001351</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">000438 sddlmnk<span style="mso-spacerun: yes;"> </span>/dev/sdpy USP_V.0048422.001352</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">000439 sddlmnl<span style="mso-spacerun: yes;"> </span>/dev/sdpz USP_V.0048422.001353</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">000440 sddlmnm<span style="mso-spacerun: yes;"> </span>/dev/sdqa USP_V.0048422.001354</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">000441 sddlmnn<span style="mso-spacerun: yes;"> </span>/dev/sdqb USP_V.0048422.001355</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">000442 sddlmno<span style="mso-spacerun: yes;"> </span>/dev/sdqc USP_V.0048422.001356</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">000443 sddlmnm<span style="mso-spacerun: yes;"> </span>/dev/sdqd USP_V.0048422.001354</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">000444 sddlmnn<span style="mso-spacerun: yes;"> </span>/dev/sdqe USP_V.0048422.001355</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">000445 sddlmno<span style="mso-spacerun: yes;"> </span>/dev/sdqf USP_V.0048422.001356</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">KAPL01001-I The HDLM command completed normally. Operation name = view, completion time = 2010/07/30 13:02:49</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# /opt/DynamicLinkManager/bin/dlnkmgr view -drvpath | grep 1354</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">000440 0002.0000.0000000000000000.00DD HITACHI .OPEN-V<span style="mso-spacerun: yes;"> </span>.0048422<span style="mso-spacerun: yes;"> </span>001354<span style="mso-spacerun: yes;"> </span>3F<span style="mso-spacerun: yes;"> </span>Online<span style="mso-spacerun: yes;"> </span>Own<span style="mso-spacerun: yes;"> </span>0<span style="mso-spacerun: yes;"> </span>0<span style="mso-spacerun: yes;"> </span>0 sddlmnm </span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">000443 0003.0000.0000000000000000.00DD HITACHI .OPEN-V<span style="mso-spacerun: yes;"> </span>.0048422<span style="mso-spacerun: yes;"> </span>001354<span style="mso-spacerun: yes;"> </span>4F<span style="mso-spacerun: yes;"> </span>Online<span style="mso-spacerun: yes;"> </span>Own<span style="mso-spacerun: yes;"> </span>0<span style="mso-spacerun: yes;"> </span>0<span style="mso-spacerun: yes;"> </span>0 sddlmnm </span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# pvcreate pvcraeate /dev/sddlmnm /dev/sddlmnn /dev/sddlmno</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;"><span style="mso-spacerun: yes;"> </span>WARNING: Locking disabled. Be careful! This could corrupt your metadata.</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;"><span style="mso-spacerun: yes;"> </span>Physical volume "/dev/sddlmnm" successfully created</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;"><span style="mso-spacerun: yes;"> </span>Physical volume "/dev/sddlmnn" successfully created</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;"><span style="mso-spacerun: yes;"> </span>Physical volume "/dev/sddlmno" successfully created</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# vgdiskplay</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">-bash: vgdiskplay: command not found</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# vgdisplay </span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;"><span style="mso-spacerun: yes;"> </span>WARNING: Locking disabled. Be careful! This could corrupt your metadata.</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# df -h</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">Filesystem<span style="mso-spacerun: yes;"> </span>Size<span style="mso-spacerun: yes;"> </span>Used Avail Use% Mounted on</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/dev/cciss/c0d0p2<span style="mso-spacerun: yes;"> </span>25G<span style="mso-spacerun: yes;"> </span>18G<span style="mso-spacerun: yes;"> </span>5.4G<span style="mso-spacerun: yes;"> </span>77% /</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/dev/cciss/c0d0p6<span style="mso-spacerun: yes;"> </span>9.7G<span style="mso-spacerun: yes;"> </span>4.7G<span style="mso-spacerun: yes;"> </span>4.5G<span style="mso-spacerun: yes;"> </span>52% /home</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/dev/cciss/c0d0p5<span style="mso-spacerun: yes;"> </span>15G<span style="mso-spacerun: yes;"> </span>484M<span style="mso-spacerun: yes;"> </span>14G<span style="mso-spacerun: yes;"> </span>4% /var</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/dev/cciss/c0d0p1<span style="mso-spacerun: yes;"> </span>494M<span style="mso-spacerun: yes;"> </span>26M<span style="mso-spacerun: yes;"> </span>444M<span style="mso-spacerun: yes;"> </span>6% /boot</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/dev/cciss/c0d0p7<span style="mso-spacerun: yes;"> </span>29G<span style="mso-spacerun: yes;"> </span>9.5G<span style="mso-spacerun: yes;"> </span>18G<span style="mso-spacerun: yes;"> </span>36% /oracle</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">tmpfs<span style="mso-spacerun: yes;"> </span>32G<span style="mso-spacerun: yes;"> </span>0<span style="mso-spacerun: yes;"> </span>32G<span style="mso-spacerun: yes;"> </span>0% /dev/shm</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/dev/mapper/fmsvg-fmsvol</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;"><span style="mso-spacerun: yes;"> </span>1.9T<span style="mso-spacerun: yes;"> </span>916G<span style="mso-spacerun: yes;"> </span>903G<span style="mso-spacerun: yes;"> </span>51% /fmsdata</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# vgextend fmsvg /dev/sddlmnm /dev/sddlmnn /dev/sddlmno</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;"><span style="mso-spacerun: yes;"> </span>WARNING: Locking disabled. Be careful! This could corrupt your metadata.</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;"><span style="mso-spacerun: yes;"> </span>Volume group "fmsvg" successfully extended</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# lvextend -L +400G /dev/mapper/fmsvg-fmsvol</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;"><span style="mso-spacerun: yes;"> </span>WARNING: Locking disabled. Be careful! This could corrupt your metadata.</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;"><span style="mso-spacerun: yes;"> </span>Extending logical volume fmsvol to 2.29 TB</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;"><span style="mso-spacerun: yes;"> </span>Logical volume fmsvol successfully resized</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# df -h</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">Filesystem<span style="mso-spacerun: yes;"> </span>Size<span style="mso-spacerun: yes;"> </span>Used Avail Use% Mounted on</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/dev/cciss/c0d0p2<span style="mso-spacerun: yes;"> </span>25G<span style="mso-spacerun: yes;"> </span>18G<span style="mso-spacerun: yes;"> </span>5.4G<span style="mso-spacerun: yes;"> </span>77% /</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/dev/cciss/c0d0p6<span style="mso-spacerun: yes;"> </span>9.7G<span style="mso-spacerun: yes;"> </span>4.7G<span style="mso-spacerun: yes;"> </span>4.5G<span style="mso-spacerun: yes;"> </span>52% /home</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/dev/cciss/c0d0p5<span style="mso-spacerun: yes;"> </span>15G<span style="mso-spacerun: yes;"> </span>477M<span style="mso-spacerun: yes;"> </span>14G<span style="mso-spacerun: yes;"> </span>4% /var</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/dev/cciss/c0d0p1<span style="mso-spacerun: yes;"> </span>494M<span style="mso-spacerun: yes;"> </span>26M<span style="mso-spacerun: yes;"> </span>444M<span style="mso-spacerun: yes;"> </span>6% /boot</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/dev/cciss/c0d0p7<span style="mso-spacerun: yes;"> </span>29G<span style="mso-spacerun: yes;"> </span>9.5G<span style="mso-spacerun: yes;"> </span>18G<span style="mso-spacerun: yes;"> </span>36% /oracle</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">tmpfs<span style="mso-spacerun: yes;"> </span>32G<span style="mso-spacerun: yes;"> </span>0<span style="mso-spacerun: yes;"> </span>32G<span style="mso-spacerun: yes;"> </span>0% /dev/shm</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/dev/mapper/fmsvg-fmsvol</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>1.9T<span style="mso-spacerun: yes;"> </span>923G<span style="mso-spacerun: yes;"> </span>896G<span style="mso-spacerun: yes;"> </span>51% /fmsdata</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# resize2fs /dev/mapper/fmsvg-fmsvol</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">resize2fs 1.39 (29-May-2006)</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">Filesystem at /dev/mapper/fmsvg-fmsvol is mounted on /fmsdata; on-line resizing required</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">Performing an on-line resize of /dev/mapper/fmsvg-fmsvol to 614885376 (4k) blocks.</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">The filesystem on /dev/mapper/fmsvg-fmsvol is now 614885376 blocks long.</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# </span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# df -h</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">Filesystem<span style="mso-spacerun: yes;"> </span>Size<span style="mso-spacerun: yes;"> </span>Used Avail Use% Mounted on</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/dev/cciss/c0d0p2<span style="mso-spacerun: yes;"> </span>25G<span style="mso-spacerun: yes;"> </span>18G<span style="mso-spacerun: yes;"> </span>5.4G<span style="mso-spacerun: yes;"> </span>77% /</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/dev/cciss/c0d0p6<span style="mso-spacerun: yes;"> </span>9.7G<span style="mso-spacerun: yes;"> </span>4.7G<span style="mso-spacerun: yes;"> </span>4.5G<span style="mso-spacerun: yes;"> </span>52% /home</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/dev/cciss/c0d0p5<span style="mso-spacerun: yes;"> </span>15G<span style="mso-spacerun: yes;"> </span>477M<span style="mso-spacerun: yes;"> </span>14G<span style="mso-spacerun: yes;"> </span>4% /var</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/dev/cciss/c0d0p1<span style="mso-spacerun: yes;"> </span>494M<span style="mso-spacerun: yes;"> </span>26M<span style="mso-spacerun: yes;"> </span>444M<span style="mso-spacerun: yes;"> </span>6% /boot</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/dev/cciss/c0d0p7<span style="mso-spacerun: yes;"> </span>29G<span style="mso-spacerun: yes;"> </span>9.5G<span style="mso-spacerun: yes;"> </span>18G<span style="mso-spacerun: yes;"> </span>36% /oracle</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">tmpfs<span style="mso-spacerun: yes;"> </span>32G<span style="mso-spacerun: yes;"> </span>0<span style="mso-spacerun: yes;"> </span>32G<span style="mso-spacerun: yes;"> </span>0% /dev/shm</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">/dev/mapper/fmsvg-fmsvol</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><b style="mso-bidi-font-weight: normal;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;"><span style="mso-spacerun: yes;"> </span>2.3T<span style="mso-spacerun: yes;"> </span>1.1T<span style="mso-spacerun: yes;"> </span>1.2T<span style="mso-spacerun: yes;"> </span>48% /fmsdata</span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[root@localserver ~]# exit</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">logout</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">[c817767@localserver ~]$ exit</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;">logout</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"><br />
</div><div class="MsoNormal" style="margin: 0cm 0cm 10pt;"><span lang="EN-US"><span style="font-family: Calibri;"></span></span></div></div>Alok Singhhttp://www.blogger.com/profile/14612064356463719721noreply@blogger.com0tag:blogger.com,1999:blog-7284889588085189074.post-59458886514586971282011-02-28T02:48:00.000-08:002011-02-28T02:48:50.241-08:00<div dir="ltr" style="text-align: left;" trbidi="on"><div class="ListParagraph" style="margin: 0cm 0cm 10pt 22.5pt; mso-list: l1 level1 lfo2; text-indent: -18pt;"><span lang="EN-US" style="mso-bidi-font-weight: bold;"><span style="font-family: Calibri;">1.)</span><span style="font-family: 'Times New Roman';"> </span></span><b><u><span lang="EN-US"><span style="font-family: Calibri;">How To configure HOST name in RHEL</span></span></u></b></div><div class="ListParagraph" style="margin: 0cm 0cm 10pt 36pt;"><br />
</div><div class="ListParagraph" style="margin: 0cm 0cm 10pt 36pt;"><b><span lang="EN-US"><span style="font-family: Calibri;">[root@localhost ~]# Vi /etc/sysconfig/network</span></span></b></div><div class="MsoNormal" style="margin: 0cm 0cm 10pt 72pt; text-indent: 36pt;"><b><span lang="EN-US"><span style="font-family: Calibri;">HOSTNAME = station1.example.com</span></span></b></div><div class="ListParagraph" style="margin: 0cm 0cm 10pt 22.5pt; mso-list: l1 level1 lfo2; text-indent: -18pt;"><span lang="EN-US" style="mso-bidi-font-weight: bold;"><span style="font-family: Calibri;">2.)</span><span style="font-family: 'Times New Roman';"> </span></span><b><u><span lang="EN-US"><span style="font-family: Calibri;">How to configure Network IP in RHEL </span></span></u></b></div><b><span lang="EN-US"><span style="mso-spacerun: yes;"> </span>[root@localhost ~]# </span></b><code><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;"><span style="mso-spacerun: yes;"> </span>system-config-network-tui</span></code><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_Hk-Bx_Crnqprkw6SEUQoKYuS09TrkoZ-w715m7dgNxxy9mzFNkDEnUwcCalGgcjhEgH6o8tuJi6M3fd-EvwqH7p1C3DVVbq82Vtphaiq6kZzWBYo7VSGfeDo0pnZpkP9QU-SwX3wflI/s1600/a.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="210" l6="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_Hk-Bx_Crnqprkw6SEUQoKYuS09TrkoZ-w715m7dgNxxy9mzFNkDEnUwcCalGgcjhEgH6o8tuJi6M3fd-EvwqH7p1C3DVVbq82Vtphaiq6kZzWBYo7VSGfeDo0pnZpkP9QU-SwX3wflI/s320/a.JPG" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><span lang="EN-US" style="font-family: Calibri; font-size: 11pt; mso-ansi-language: EN-US; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;">Select your Ethernet card (eth0 or eth1) and hit Enter key</span></div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-4a2ZiEUOJ8ITZU7DcWiieuuyDWiHx6g8WdzYVjbOLVINDUctaKJ3ZqXj_ytkgqvjPDKcX7i9msImagIDRA9m1yaEz2Hlavp_YUZiWi2BHK7zIeo8m85XyEVS3JQ7stLTZjnC_v9oIyQ/s1600/a1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="202" l6="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-4a2ZiEUOJ8ITZU7DcWiieuuyDWiHx6g8WdzYVjbOLVINDUctaKJ3ZqXj_ytkgqvjPDKcX7i9msImagIDRA9m1yaEz2Hlavp_YUZiWi2BHK7zIeo8m85XyEVS3JQ7stLTZjnC_v9oIyQ/s320/a1.JPG" width="320" /></a></div><div class="ListParagraph" style="margin: 0cm 0cm 10pt 36pt;"><b><span lang="EN-US"><span style="font-family: Calibri;">[root@localhost ~]# </span></span></b><code><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: Calibri;"><span style="mso-spacerun: yes;"> </span>Service network restart</span></code><b><u><span lang="EN-US"></span></u></b></div><code><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt;"><span lang="EN-US" style="font-family: Calibri; font-size: 11pt; mso-ansi-language: EN-US; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;"><shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f"> <stroke joinstyle="miter"></stroke><formulas><f eqn="if lineDrawn pixelLineWidth 0"></f><f eqn="sum @0 1 0"></f><f eqn="sum 0 0 @1"></f><f eqn="prod @2 1 2"></f><f eqn="prod @3 21600 pixelWidth"></f><f eqn="prod @3 21600 pixelHeight"></f><f eqn="sum @0 0 1"></f><f eqn="prod @6 1 2"></f><f eqn="prod @7 21600 pixelWidth"></f><f eqn="sum @8 21600 0"></f><f eqn="prod @7 21600 pixelHeight"></f><f eqn="sum @10 21600 0"></f></formulas><path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f"></path><lock aspectratio="t" v:ext="edit"></lock></shapetype></span> </span></code></div>Alok Singhhttp://www.blogger.com/profile/14612064356463719721noreply@blogger.com0tag:blogger.com,1999:blog-7284889588085189074.post-17855064346754885602011-02-28T02:24:00.000-08:002011-02-28T02:24:14.188-08:00Linux Failover Bonding<div dir="ltr" style="text-align: left;" trbidi="on"><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;">1. Add the below lines to /etc/modprobe.conf</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>alias bond0 bonding</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>options bond0 mode=1 miimon=100</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;">2. Create bond0 device file, /etc/sysconfig/network-scripts/ifcfg-bond0 with the following content:</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>DEVICE=bond0</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>BOOTPROTO=none</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>ONBOOT=yes</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>NETWORK=192.168.122.0</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>NETMASK=255.255.255.0</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>IPADDR=192.168.122.118</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>USERCTL=no</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;">3. Create /etc/sysconfig/network-scripts/ifcfg-eth0 with content:</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>DEVICE=eth0</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>MASTER=bond0</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>SLAVE=yes</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>USERCTL=no</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>BOOTPROTO=dhcp</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>IPV6INIT=yes</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>IPV6_AUTOCONF=yes</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>ONBOOT=yes</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;">4. Create /etc/sysconfig/network-scripts/ifcfg-eth1 with content:</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>DEVICE=eth1</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>MASTER=bond0</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>SLAVE=yes</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>USERCTL=no</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>BOOTPROTO=dhcp</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>IPV6INIT=yes</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>IPV6_AUTOCONF=yes</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>ONBOOT=yes</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;">5.[root@localhost ~]# service network restart</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;">6.[root@localhost ~]# cat /proc/net/bonding/bond0</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>Ethernet Channel Bonding Driver: v3.2.4 (January 28, 2008)</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>Bonding Mode: fault-tolerance (active-backup)</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>Primary Slave: None</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>Currently Active Slave: eth0</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>MII Status: up</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;">7.[root@localhost ~]# ifdown eth0</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;">8.[root@localhost ~]# cat /proc/net/bonding/bond0</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>Ethernet Channel Bonding Driver: v3.2.4 (January 28, 2008)</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>Bonding Mode: fault-tolerance (active-backup)</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>Primary Slave: None</span></span></div><div class="MsoNormal" style="margin: 0cm 0cm 3pt;"><span lang="EN-US"><span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>Currently Active Slave: eth1</span></span></div></div>Alok Singhhttp://www.blogger.com/profile/14612064356463719721noreply@blogger.com0tag:blogger.com,1999:blog-7284889588085189074.post-46086680173209771622011-02-28T02:22:00.001-08:002011-02-28T02:22:36.546-08:00SSH login without password<div dir="ltr" style="text-align: left;" trbidi="on"><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 1;"><b><span lang="EN-US" style="color: #d00000; font-family: 'Tw Cen MT'; font-size: 20pt; mso-fareast-font-family: 'Times New Roman'; mso-font-kerning: 18.0pt;"><span style="font-family: Calibri;">SSH login without password</span></span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2;"><b><span lang="EN-US" style="color: #d00000; font-family: 'Tw Cen MT'; font-size: 13pt; mso-fareast-font-family: 'Times New Roman';"><span style="font-family: Calibri;">Your aim</span></span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;"><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';">You want to use Linux and OpenSSH to automize your tasks. Therefore you need an <b>automatic</b> login from host A / user a to Host B / user b. You don't want to enter any passwords, because you want to call </span><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman';">ssh</span><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"> from a within a shell script.</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2;"><b><span lang="EN-US" style="color: #d00000; font-family: 'Tw Cen MT'; font-size: 13pt; mso-fareast-font-family: 'Times New Roman';"><span style="font-family: Calibri;">How to do it</span></span></b></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;"><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';">First log in on A as user a and generate a pair of authentication keys. Do not enter a passphrase:</span></div><div class="MsoNormal" style="background: #f0d0c0; line-height: normal; margin: 0cm 0cm 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';">a@A:~> ssh-keygen -t rsa</span></div><div class="MsoNormal" style="background: #f0d0c0; line-height: normal; margin: 0cm 0cm 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';">Generating public/private rsa key pair.</span></div><div class="MsoNormal" style="background: #f0d0c0; line-height: normal; margin: 0cm 0cm 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';">Enter file in which to save the key (/home/a/.ssh/id_rsa): </span></div><div class="MsoNormal" style="background: #f0d0c0; line-height: normal; margin: 0cm 0cm 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';">Created directory '/home/a/.ssh'.</span></div><div class="MsoNormal" style="background: #f0d0c0; line-height: normal; margin: 0cm 0cm 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';">Enter passphrase (empty for no passphrase): </span></div><div class="MsoNormal" style="background: #f0d0c0; line-height: normal; margin: 0cm 0cm 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';">Enter same passphrase again: </span></div><div class="MsoNormal" style="background: #f0d0c0; line-height: normal; margin: 0cm 0cm 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';">Your identification has been saved in /home/a/.ssh/id_rsa.</span></div><div class="MsoNormal" style="background: #f0d0c0; line-height: normal; margin: 0cm 0cm 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';">Your public key has been saved in /home/a/.ssh/id_rsa.pub.</span></div><div class="MsoNormal" style="background: #f0d0c0; line-height: normal; margin: 0cm 0cm 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';">The key fingerprint is:</span></div><div class="MsoNormal" style="background: #f0d0c0; line-height: normal; margin: 0cm 0cm 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';">3e:4f:05:79:3a:9f:96:7c:3b:ad:e9:58:37:bc:37:e4 a@A</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;"><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';">Now use </span><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman';">ssh</span><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"> to create a directory </span><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman';">~/.ssh</span><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"> as user b on B. (The directory may already exist, which is fine):</span></div><div class="MsoNormal" style="background: #f0d0c0; line-height: normal; margin: 0cm 0cm 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';">a@A:~> ssh b@B mkdir -p .ssh</span></div><div class="MsoNormal" style="background: #f0d0c0; line-height: normal; margin: 0cm 0cm 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';">b@B's password: </span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;"><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';">Finally append a's new public key to </span><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman';">b@B:.ssh/authorized_keys</span><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"> and enter b's password one last time:</span></div><div class="MsoNormal" style="background: #f0d0c0; line-height: normal; margin: 0cm 0cm 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';">a@A:~> cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'</span></div><div class="MsoNormal" style="background: #f0d0c0; line-height: normal; margin: 0cm 0cm 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';">b@B's password: </span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;"><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';">From now on you can log into B as b from A as a without password:</span></div><div class="MsoNormal" style="background: #f0d0c0; line-height: normal; margin: 0cm 0cm 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';">a@A:~> ssh b@B hostname</span></div><div class="MsoNormal" style="background: #f0d0c0; line-height: normal; margin: 0cm 0cm 0pt; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';">B</span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;"><b><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';">A note</span></b><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"> from one of our readers: Depending on your version of SSH you might also have to do the following changes: </span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt 7.5pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-indent: -18pt;"><span lang="EN-US" style="font-family: Symbol; font-size: 10pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 'Times New Roman';">·<span style="font: 7pt 'Times New Roman';"> </span></span><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';">Put the public key in </span><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman';">.ssh/authorized_keys2</span><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"> </span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt 7.5pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-indent: -18pt;"><span lang="EN-US" style="font-family: Symbol; font-size: 10pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 'Times New Roman';">·<span style="font: 7pt 'Times New Roman';"> </span></span><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';">Change the permissions of </span><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman';">.ssh</span><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"> to </span><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman';">700</span><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"> </span></div><div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 10pt 7.5pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-indent: -18pt;"><span lang="EN-US" style="font-family: Symbol; font-size: 10pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 'Times New Roman';">·<span style="font: 7pt 'Times New Roman';"> </span></span><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';">Change the permissions of </span><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman';">.ssh/authorized_keys2</span><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"> to </span><span lang="EN-US" style="font-family: 'Courier New'; font-size: 10pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: 'Times New Roman';">640</span><span lang="EN-US" style="font-family: Verdana; font-size: 12pt; mso-fareast-font-family: 'Times New Roman';"></span></div><div class="MsoNormal" style="margin: 0cm 0cm 10pt;"><br />
</div></div>Alok Singhhttp://www.blogger.com/profile/14612064356463719721noreply@blogger.com0tag:blogger.com,1999:blog-7284889588085189074.post-19818211075483996682011-02-28T02:20:00.000-08:002011-02-28T02:20:42.888-08:00LINUX PXE Boot Server<div dir="ltr" style="text-align: left;" trbidi="on"><div class="MsoNormal" style="margin: 0cm 0cm 0pt;"><b><span style="color: black;">1)</span></b><span style="color: black;"> The next step is to choose a box to be the PXE boot server. This can really be any box at all, as long as you have a NIC in it that works reliably under Linux. For the purposes of this documentation, I'm going to assume that you've loaded RHEL on this box (do that now, if you've not already). Get this box onto the network with DHCP (just like a normal installation).<br />
<br />
<b>2)</b> Next you'll need to install the following packages </span></div><div class="MsoNormal" style="margin: 0cm 0cm 0pt;"><span style="color: black;">tftp-server<br />
dhcp<br />
httpd<br />
syslinux<br />
<br />
If you use yum to install them, then it will be generally alot easier:</span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">yum install tftp-server dhcp httpd syslinux</span><span style="color: black;"><br />
answer Y to all dependency/installation questions.<br />
<br />
<b>3)</b> Now you need to setup the DHCP server. With the RPM for dhcp, all you need to do is create </span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">/etc/dhcpd.conf</span><span style="color: black;"> with the following contents:<br />
</span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">ddns-update-style interim;<br />
subnet 192.168.0.0 netmask 255.255.255.0 {<br />
range 192.168.0.10 192.168.0.254;<br />
default-lease-time 3600;<br />
max-lease-time 4800;<br />
option routers 192.168.0.1;<br />
option domain-name-servers 192.168.0.1;<br />
option subnet-mask 255.255.255.0;<br />
option domain-name "llama.net";<br />
option time-offset -8;<br />
}<br />
<br />
host llama0 {<br />
hardware ethernet 04:4B:80:80:80:03;<br />
fixed-address 192.168.0.254;<br />
option host-name "llama0";<br />
filename "pxelinux.0";<br />
}</span><span style="color: black;"><br />
<br />
In a nutshell, this sets up a DNS server that will assign IP address 192.168.0.254 to your client box that has MAC address 04:4B:80:80:80:03 assigned to its PXE-boot capable NIC. Another thing to note is that we're reserving the private 192.168 subnet for this setup. The only thing you need to change in the above, is the MAC address to match that of the NIC on your client box.<br />
<br />
<b>4)</b> Next you need to activate tftp within xinetd. All that is neccesary is to change </span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">disable=yes</span><span style="color: black;"> to </span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">disable=no</span><span style="color: black;"> in </span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">/etc/xinetd.d/tftp</span><span style="color: black;"> . Then restart xinetd. For future reference, the tftp RPM for FC4 stores its servable content under </span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">/tftpboot.</span><span style="color: black;"><br />
<br />
<b>5)</b> Now we need to setup your PXE server to use a static IP on the new private subnet. Create the file </span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">/etc/sysconfig/network-scripts/ifcfg-eth0.static</span><span style="color: black;"> with the following contents:<br />
</span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">DEVICE=eth0<br />
BOOTPROTO=STATIC<br />
ONBOOT=no<br />
TYPE=Ethernet<br />
IPADDR=192.168.0.2<br />
NETMASK=255.255.255.0<br />
GATEWAY=192.168.0.1</span><span style="color: black;"><br />
<br />
<b>6)</b> Now we need to setup the PXE boot environment on the server. To do this, you need to have either the Linux distribution that you wish to install over PXE either in CD format, or all the content of the CDs available on the network.<br />
On the first CD of every RH/FC distribution there is a subdirectory called 'isolinux'. In that directory you will find two files, vmlinuz and initrd.img. These are the kernel & initrd.img that the RH/FC bootable CDs use to get the installer (anaconda) booted for performing the installation. Copy both of those files into /tftpboot and make sure that they are world readable. If you are planning to allow more than one version/distribution to be PXE boot installable, then you should rename both files so that its clear that they are for whatever version/distribution they came from (such as vmlinuz-RHEL4, initrd-RHEL4).<br />
<br />
Next, you need the actual pxe boot linux kernel (what is actually run immediately after your PXE boot client box gets a DHCP lease). In this case, that file is pxelinux.0, and is part of the syslinux RPM. For FC4, you can find it at </span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">/usr/lib/syslinux/pxelinux.0.</span><span style="color: black;"> Copy that file into /tftpboot and make sure that it is world readable.<br />
<br />
<b>7)</b> Next we need to configure pxelinux. First create the directory /tftpboot/pxelinux.cfg (and make it world readable). Inside that directory you need to create a number of zero size files (use touch):</span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">01-04-4B-80-80-80-03<br />
C<br />
C0<br />
C0A<br />
C0A8<br />
C0A80<br />
C0A800<br />
C0A800F<br />
C0A800FE<br />
01-04-4B-80-80-80-03</span><span style="color: black;"><br />
<br />
The first 8 are the hex representation of the 192.168.0.254 IP address that your PXE boot client will be assigned. The permutations allow a broader IP subnet to be searched first for matches. The last entry is the MAC address of your PXE boot client's NIC (with dashes substituted for the colons), with '01' pre-pended. The "01" at the front represents a hardware type of Ethernet, so pxelinux.0 see's the configuration string as an IP address.<br />
<br />
<b>8)</b> Now create the default pxelinux configuration inside the new file</span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">/tftpboot/pxelinux.cfg/default:<br />
prompt 1<br />
default linux<br />
timeout 100<br />
<br />
label linux<br />
kernel vmlinuz<br />
append initrd=initrd.img ramdisk_size=9216 noapic acpi=off</span><span style="color: black;"><br />
<br />
<br />
<b>9)</b> Now you need to put the full contents of your Linux distro (all CDs) somewhere on disk. I put it under </span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">/tftpboot/RHEL4U1.</span><span style="color: black;"> In order to allow for installation over HTTP (apache), edit </span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">/etc/httpd/conf/httpd.conf</span><span style="color: black;"> and add the following:</span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';"><Directory /tftpboot/RHEL4U1><br />
Options Indexes<br />
AllowOverride None<br />
</Directory><br />
Alias /linux /tftpboot/RHEL4U1</span><span style="color: black;"><br />
<br />
<br />
<b>10)</b> At this stage, you're ready to hook up the switch. You should have CAT5 running between the switch & the PXE boot server, and the client box.<br />
<br />
<b>11)</b> On the PXE boot server, bring down your DHCP network connected eth0 (</span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">ifdown eth0</span><span style="color: black;">), disconnect the CAT5 connected to the network, and plug in the cat5 connected to your private switch. Now bring up the static IP for the PXE server with (</span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">ifup eth0.static</span><span style="color: black;">). You can verify that it came up successfully by verifying that you have IP address 192.168.0.2 in ifconfig.<br />
<br />
<b>12)</b> Now start dhcpd & apache and activate tftp by running the following:</span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">service dhcpd start<br />
service xinetd restart<br />
service httpd start</span><span style="color: black;"><br />
<br />
and verify that they are all in your process list.<br />
<br />
<b>13)</b> Plug the PXE client box's CAT5 into the switch, and verify that the NIC appears first in the BIOS boot order. (re)boot and you should get a DHCP lease, and start booting successfully off the network.<br />
<br />
<b>14)</b> When you get into the RH/FC installer which asks you for the install method, choose HTTP. Fill in 192.168.0.2 for the name, and 'linux' for the path, and you should be all set.<br />
<br />
<b>15)</b> If you run into any problems, check </span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">/var/log/messages</span><span style="color: black;"> for errors (that's where all dhcp & tftp stuff will get logged). </span><span style="color: black; font-family: 'Courier New'; mso-bidi-font-family: 'Times New Roman';">/var/log/httpd</span><span style="color: black;"> is where apache logs, but if you get that far, your problem is an apache configuration/setup issue, and not a PXE boot issue.</span></div></div>Alok Singhhttp://www.blogger.com/profile/14612064356463719721noreply@blogger.com0