Oneliner to check InnoDB status in MySQL every second:

while sleep 1; do date >> /tmp/mysql_innodb_status_log && mysql -e "show engine innodb status\G;" >> /tmp/mysql_innodb_status_log; done

Simulate cron environment

Sometimes scripts aren’t working in cron, but they’re working manually. To debug them it’s helpful to simulate their running under cron environment.

add this to cron and let it to run at least once

* * * * * env > ~/cron_env

run this command to simulate environment:

env - `cat ~/cron_env` /bin/sh

Enable 80 port in CentOS

If you did an Apache installation then you also need to enable 80 port in iptables:

iptables -I INPUT 5 -i eth0 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT

eth names in CentOS

To make sure particular device name will be assigned to particular ethernet card (there are 2 on my server) I needed to do the following:

$ vi /etc/udev/rules.d/70-persistent-net.rules 
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:ef:88:45:88:44", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="90:e6:ba:ef:80:db", NAME="eth1"