Tuesday, January 25, 2011

How to do Patch update on VMware ESX through ESX Console


How to do Patch update on VMware ESX through ESX Console 

Today  we got an opportunity learn How to do patch update in VMware ESX. It was wonderful learning/Sharing  experience   Shared by Mr.Sasi (Great VMware Certified Engineer).

The way he has Shared his Experience is really Wonderful.  I appreciate his quick work.
The following things we have learned from  Sasi:

Prerequisites Before patch update:
1)    Check CD-Rom is unmounted to Local device. ( It will avoid unnecessary simple problems during VMotion)
2)    Check the available space in the Esx server using df –h ( / should have atleast 50 MB free space )

Preparation for Patch update:
·         Set the Server in to Maintenance Mode

Install the patch via the Service console with root privileges:

The command to update patch:
#esxupdate  update –-bundle /vmfs/volume/ path_of the_update_zip ( Please copy the  downloaded zip file in to Data store so that administration time will be reduced because all ESX hosts in the cluster have access)  
After entering the patch update command . Patch installation will start automatically and will get success message.
  • Restart the server when there it is required through VC Client
Check the error logs if there is anything while updation. The following files needs to be checked.
1)/var/log/messages
2)/var/log/vmkernel
3)/var/log/vmkwarning
4) /var/log/vmware/hostd.log
After Completion  Exit the the server in maintenance mode in VC. Wait for sometime and all vms will automatically will come up.


Wednesday, January 19, 2011

Linux Port Numbers


 
21 => FTP
22 => SSH
23 => Telnet
25 => SMTP Mail Transfer
43 => WHOIS service
53 => name server (DNS)
80 => HTTP (Web server)
110 => POP protocol (for email)
995 => POP over SSL
3306 => MysQL Server
111 => rpcbind
953 => rndc
143 => IMAP Protocol (for email)
993 => IMAP Secure
443 => HTTP Secure
3128 => Squid Proxy
3306 => MysQL Server
3636 => Piranha
10000 => Webmin



Multipath Tips


Multipath Tips

·         Check necessary multipath-tools package are installed
·         chkconfig multipathd on
  
Activate multipath service:

service multipathd start


Find out WWIDs: 

#multipath -v2 -d


Activate multipaths:

#multipath -v2


Will show multipath luns and groups. Look for the multipath group number, this is the dm-# listed in /proc/partitions. The multipath lun is accessed via the /dev/dm-# device entry


Verify the multipath:

#multipath –l

It will list the complete multipath list for example:
[root@baskar.com ~]# multipath -ll
LUN1 (360050768018e827fa000000000000154) dm-7 IBM,2145
[size=200G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=100][active]
 \_ 3:0:1:1 sde 8:64  [active][ready]
 \_ 4:0:1:1 sdi 8:128 [active][ready]
\_ round-robin 0 [prio=20][enabled]
 \_ 3:0:0:1 sdc 8:32  [active][ready]
 \_ 4:0:0:1 sdg 8:96  [active][ready]
LUN0 (360050768018e827fa000000000000153) dm-6 IBM,2145
[size=200G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=100][active]
 \_ 3:0:0:0 sdb 8:16  [active][ready]
 \_ 4:0:0:0 sdf 8:80  [active][ready]
\_ round-robin 0 [prio=20][enabled]
 \_ 3:0:1:0 sdd 8:48  [active][ready]
 \_ 4:0:1:0 sdh 8:112 [active][ready]

·         verify (you should see sensible device names in the output):
#ls -la /dev/mapper

Tuesday, January 18, 2011

Mysql and Postgresql Backup and Restore method

Mysql and Postgresql Backup and Restore method
 
#Backup for Mysql DB
tar jcvf db.tar.bz2 /var/lib/mysql
 
#Restore
tar -C /var/lib/mysql -jxvf db.tar.bz2
 
#backup for Postgresql Database
/usr/bin/pg_dumpall > /home/baskar/backup/db.out
 
#Restore
psql -e -d template1 -f /home/baskar/backup/db.out

SSH Tips


SSH

 
Filename
Function
/etc/ssh
ssh configuration files
/etc/ssh/ssh_config
Default user files
/etc/ssh/sshd_config
ssh sever system wide configuration file
/etc/ssh/ssh_host_key
Private key file format
 
Secure Shell to administer the remote server. Only root is allowed to access the Shell. Secure Shell can be used to access Remote server management - managing user accounts, managing website accounts, managing server configuration files
 
If you would like to specify the login names to the server through ssh.
You can edit the sshd_config file in /etc/ssh/sshd_config
 
vi sshd_config
Add the following line in the file.
# Authentication:
#LoginGraceTime 120
#PermitRootLogin yes
AllowUsers root baskar britto nkutty
 
              If you don’t like to permit the Root login through ssh
              Add the following line the sshd_config
 
PermitRootLogin no