Friday, May 14, 2010

php-mbstring

 1002  yum install php-mbstring
 1003  httpd -k restart
 1004  /etc/init.d/httpd -k restart
 1005  /etc/init.d/httpd -k stop
 1006  /etc/init.d/httpd stop
 1007  /etc/init.d/httpd start

ubuntu open iptables mysql port

 121  iptables -A INPUT -s x.x.x.x -p tcp --dport 3306 -j ACCEPT
  122  iptables -L
  123  iptables -A INPUT -j REJECT
  118  iptables -D INPUT 5

 2003  iptables -L INPUT
 2004  iptables -L INPUT
 2005  iptables -L INPUT 4
 2006  iptables -I INPUT 5 -s 71.26.22.12 -p tcp --dport 3306 -j ACCEPT
 2007  iptables -L INPUT 5
 2008  iptables -L INPUT
 2009  iptables -D INPUT 4
 2010  iptables -L INPUT


mysql add chinese support

mysql> alter table compounds add CNameCN varchar(255) CHARACTER SET gb2312 after CName;

Thursday, May 13, 2010

Block brute force attacks with iptables

    8  sudo iptables -D INPUT 1
    9  sudo iptables -L
   10  sudo iptables -D INPUT 1
   11  sudo iptables -L
   12  sudo iptables -A INPUT -i eth0 -p tcp --dport 22 -m state --state NEW -m recent --set --name SSH
   13  sudo iptables -L
   14  sudo iptables -A INPUT -i eth0 -p tcp --dport 22 -m state --state NEW -m recent --update --seconds 60 --hitcount 8 --rttl --name SSH -j DROP

apache support chinese charset

.htaccess

AddType text/html;charset=gb2312 html php

============
cg@SS$ sudo apt-get install xfonts-intl-chinese



centos chinese support

 1021  yum groupinstall "Chinese Support"