Changing Timezone in RHEL/Centos

This is one way of changing your server timezone and resync on the ntp server

 service ntpd stop

 cp /usr/share/zoneinfo/Asia/Singapore /etc/localtime

 ntpdate 

 service ntpd start 


more info: http://www.redhat.com/advice/tips/timezone.html

By penoi on Thursday, May 17, 2012 | | A comment?

remove host key under known_hosts

Normally after a server rebuild you will receive a warning that the host identification has changed

 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.


One solution is to remove the offending host key

ssh-keygen -f "/home/chris/.ssh/known_hosts" -R ip-address-of-the-host

By penoi on Tuesday, May 8, 2012 | | A comment?

mysql wont start after server crashed

My mysql database crashed after saving a snapshot thru KVM. Restarting mysqld shows errors under /var/log/mysqld.log

..check that your my.cnf matches the ibdata files..


one solution was to move all ib* data and restart mysqld
 mkdir /srv/mysql/old
mv /srv/mysql/ib* /srv/mysql/old
service mysqld restart

By penoi on Thursday, May 3, 2012 | | A comment?