innodb_force_recovery=1 (and try 2,3,4,5,6 la al al al ala)
innodb force recovery
April 18th, 2012Repair all mysql database
April 18th, 2012myisamchk -r /var/lib/mysql/*/*.MYI
find command example
March 26th, 2012If you can’t “ls” to see the files inside the folder due to too many files.
1. You can use
find . -type f |more
2. you want to remove a files with specific file name.
find . -name ‘tp-property.php.1*’ | xargs rm -v
3. or you want to remove all you can
find . -type f | xargs rm -v
4. find a files modfied on how many days b4
find . -type f -mtime -60 |xargs rm -v
-mtime +60 means you are looking for a file modified 60 days ago.
-mtime -60 means less than 60 days.
-mtime 60 If you skip + or – it means exactly 60 days
check service script
March 19th, 2012if [ -z "$(pgrep java)" ]
then
echo “java is not running”
kill -9 `/sbin/pidof java`
cd /usr/local/java/bin/
./startup.sh
else
echo “java is running”
fi
HTTP Error 500.22 – Internal Server Error “An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode”
February 19th, 2012My first thought was change the application pool to classic. but it will lead to handler mapping issue.
So the resolution was add the below line to the web.config files. and it works.
<system.webServer>
<validation validateIntegratedModeConfiguration=”false” />
</system.webServer>
zimbra auto bcc
December 16th, 20111. in /opt/zimbra/postfix/conf create a file called sender_bcc and add the users you want to copy/send to
employee@zimbra.domain.com employee@oldmailapp.domain.com 2. in /opt/zimbra/postfix/conf/main.conf add
sender_bcc_maps = hash:/opt/zimbra/postfix/conf/sender_bcc 3. su zimbra 4. postmap /opt/zimbra/postfix/conf/sender_bcc 5. postfix reload
PromoxVE set full duplex
October 14th, 2011ethtool -s eth0 autoneg off speed 10 duplex full
chmod files or folders only
September 19th, 2011Chmod file only
chmod 0600 $(find . ! -type d)
Chmod folder only
chmod 0600 $(find . -type d)
Hide Database in phpmyadmin
July 26th, 2011hmmmm
1. open up config.inc.php
2. add the following line to hide the database test in phpmyadmin
$cfg['Servers'][$i]['hide_db'] = ‘^test$’;
3. to hide multiple database
$cfg['Servers'][$i]['hide_db'] = ‘^information_schema|mysql|foo$’;
Fore more information, refer to the below url,
http://www.electrictoolbox.com/hide-databases-phpmyadmin/
tcpdump useful command
June 6th, 2011[root@ns160x ~]# tcpdump icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
17:21:25.635599 IP 175.136.253.50 > ns16.small-dns.com: ICMP echo request, id 32777, seq 1, length 64
17:21:25.635668 IP ns16.small-dns.com > 175.136.253.50: ICMP echo reply, id 32777, seq 1, length 64
17:21:26.635335 IP 175.136.253.50 > ns16.small-dns.com: ICMP echo request, id 32777, seq 2, length 64
17:21:26.635382 IP ns16.small-dns.com > 175.136.253.50: ICMP echo reply, id 32777, seq 2, length 64
17:21:37.018186 IP dns3.zl.iss.as9143.net > 203.223.144.17: ICMP dns3.zl.iss.as9143.net udp port 26932 unreachable, length 156
17:22:05.606569 IP 210.5.40.43 > ns16.small-dns.com: ICMP echo request, id 512, seq 43356, length 8
17:22:05.606640 IP ns16.small-dns.com > 210.5.40.43: ICMP echo reply, id 512, seq 43356, length 8