<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[SouEasy]]></title> 
<link>http://blog.soueasy.net/index.php</link> 
<description><![CDATA[我的心情,我的博客]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[SouEasy]]></copyright>
<item>
<link>http://blog.soueasy.net/post//</link>
<title><![CDATA[apache2+php+mysql+mod_secu+mod_evasive+mod_gzip+snmp＋rrdtool+cacti ]]></title> 
<author>freebird &lt;eyouy@126.com&gt;</author>
<category><![CDATA[Linux]]></category>
<pubDate>Wed, 22 Feb 2006 07:05:43 +0000</pubDate> 
<guid>http://blog.soueasy.net/post//</guid> 
<description>
<![CDATA[ 
	下载： <br/>apache2 <br/><a href="http://www.apache.org/dist/httpd/httpd-2.0.55.tar.bz2" target="_blank">http://www.apache.org/dist...</a> <br/>mysql4: <br/><a href="http://mysql.oss.eznetsols.org/Downloads/MySQL-4.1/mysql-4.1.15.tar.gz" target="_blank">http://mysql.oss.eznetsols...</a> <br/>php4: <br/><a href="http://cn.php.net/distributions/php-4.4.1.tar.bz2" target="_blank">http://cn.php.net/distribu...</a> <br/><br/>mod_security <br/><a href="http://www.modsecurity.org/download/modsecurity-apache-1.9.tar.gz" target="_blank">http://www.modsecurity.org...</a> <br/><br/><br/><br/>mod_evasive <br/><br/><br/><br/><a href="http://www.nuclearelephant.com/projects/mod_evasive/mod_evasive_1.10.1.tar.gz" target="_blank">http://www.nuclearelephant...</a> <br/><br/><br/><br/>mod_gzip <br/><br/><br/><br/><a href="http://w.yi.org/ftp/incoming/mod_gzip-2.1.0.tar.gz" target="_blank">http://w.yi.org/ftp/incomi...</a> <br/><br/><br/><br/><br/>rrdtool <br/><br/><br/><br/><a href="http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/libs/libart_lgpl-2.3.17.tar.gz" target="_blank">http://people.ee.ethz.ch/~...</a> <br/><br/><br/><br/>cacti <br/><br/><br/><br/><a href="http://www.cacti.net/downloads/cacti-0.8.6g.tar.gz" target="_blank">http://www.cacti.net/downl...</a> <br/><br/><br/><br/><br/> <br/><br/><br/>step 1:[基本环境:apache+mysql+php]安装 <br/><br/><br/><br/><br/> <br/><br/><br/><br/>1、mysql 安装: [注意：cacti-0.8.6.g版本不支持MYSQL5]<br/># tar zxvf mysql-4.1.15.tar.gz<br/># cd mysql-4.1.15<br/># groupadd mysql &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br/><br/><br/><br/># useradd -g mysql mysql &nbsp; <br/># ./configure --prefix=/usr/local/mysql <br/><br/><br/><br/># make<br/># make install <br/># cp support-files/my-medium.cnf /etc/my.cnf<br/># cd /usr/local/mysql<br/># bin/mysql_install_db --user=mysql <br/># chown -R root . <br/># chown -R mysql var <br/># chgrp -R mysql . <br/># bin/mysqld_safe --user=mysql & <br/><br/>2、apache 2 安装: <br/><br/># tar jxvf httpd-2.0.55.tar.bz2 <br/># cd httpd-2.055 <br/># vi config.sh 写入内容如下： <br/><br/><br/><br/>代码: <br/><br/><br/> <br/><br/>#!/bin/bash <br/><br/><br/><br/>HTTPD_ROOT="/usr/local/apache2" <br/><br/><br/><br/><br/> <br/><br/><br/>./configure --prefix=$HTTPD_ROOT &nbsp;<br/><br/><br/><br/>--enable-so &nbsp;<br/><br/><br/><br/>--enable-rewrite &nbsp;<br/><br/><br/><br/>--enable-info &nbsp;<br/><br/><br/><br/>--enable-cgid &nbsp;<br/><br/><br/><br/>--enable-mime-magic &nbsp;<br/><br/><br/><br/>--enable-vhost-alias &nbsp;<br/><br/><br/><br/>--enable-deflate &nbsp;<br/><br/><br/><br/>--enable-expires &nbsp;<br/><br/><br/><br/>--with-mpm=prefork <br/><br/><br/> <br/><br/><br/># sh config.sh <br/>上面过程等同于直接 <br/>./configure --prefix=/usr/local/apache2 &nbsp;<br/><br/><br/><br/>--enable-so &nbsp;<br/><br/><br/><br/>--enable-rewrite &nbsp;<br/><br/><br/><br/>--enable-info &nbsp;<br/><br/><br/><br/>--enable-cgid &nbsp;<br/><br/><br/><br/>--enable-mime-magic &nbsp;<br/><br/><br/><br/>--enable-vhost-alias &nbsp;<br/><br/><br/><br/>--enable-deflate &nbsp;<br/><br/><br/><br/>--enable-expires <br/>写一个config.sh方便今后查看和升级再编译。 <br/># make <br/># make install <br/><br/>3、安装php4 <br/># tar jxvf php-4.4.1.tar.bz2 <br/># cd php-4.4.1 <br/># vi config.sh 写入内容: <br/><br/><br/><br/>代码: <br/><br/><br/> <br/><br/>#!/bin/bash <br/><br/><br/><br/>PHP_ROOT=/usr/local/php/ <br/><br/><br/><br/>./configure --prefix=$PHP_ROOT &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--with-apxs2=/usr/local/apache2/bin/apxs &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--with-mysql=/usr/local/mysql &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--enable-mbstring &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--with-curl &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--enable-debug &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--enable-inline-optimization -q &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--with-jpeg-dir=/usr/local/ &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--with-png-dir &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--enable-thread-safety &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--enable-ctype &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--with-bz2 &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--with-zlib &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--with-gd &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--with-kerberos &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--with-gettext &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--enable-force-cgi-redirect &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--with-iconv &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--enable-gd-native-ttf &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--enable-sockets &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--with-snmp &nbsp;<br/><br/><br/><br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--enable-ucd-snmp-hack <br/><br/><br/> <br/><br/>#sh config.sh<br/># make <br/># make install <br/>#cp php.ini-dist /usr/local/php/lib/php.ini <br/><br/><br/><br/><br/>4、安装modsecurity<span style="color: #DC143C;">（mod_security 可以加强apache的安全性特别是在防sql 注入上。)</span><br/># tar zxvf modsecurity-apache-1.9.tar.gz <br/># cd modsecurity-apache-1.9/apache2/ <br/># /apache2/bin/apxs -cia mod_security.c <br/><br/><br/><br/><br/><br/>5、安装mod_evasive <span style="color: #DC143C;">防DDOS攻击</span><br/># tar zxvf &nbsp;mod_evasive_1.10.1.tar.gz<br/># cd &nbsp;mod_evasive_1.10.1<br/>#/apache/bin/apxs -i -a -c mod_evasive20.c<br/># /usr/local/apache/bin/apxs -i -a -c mod_evasive20.c <br/><br/><br/><br/>6、安装mod_gzip 对静态WEB页面进行压缩 <br/><br/><br/><br/>#tar zxvf mod_gzip-2.1.0.tar.gz <br/><br/><br/><br/># cd mod_gzip-2.1.0 <br/><br/><br/><br/>#/usr/local/apache2/bin/apxs -cia mod_gzip.c <br/><br/>step 2:基本环境配置<br/><br/><br/>配置： <br/><br/><br/><br/><br/>1、配置apache <br/><br/><br/><br/><br/> <br/><br/><br/>A．增加一个解析php 文件配置 <br/>AddType application/x-httpd-php .php <br/>B.在DirectoryIndex 后增加一个 index.php <br/>C.增加deflate 配置信息 <br/><br/><br/><br/>代码: <br/><br/><br/> <br/><br/><Location /> <br/># Insert filter <br/>SetOutputFilter DEFLATE <br/> &nbsp;<br/># Netscape 4.x has some problems... <br/>BrowserMatch ^Mozilla/4 gzip-only-text/html <br/> &nbsp;<br/># Netscape 4.06-4.08 have some more problems <br/>BrowserMatch ^Mozilla/4.0[678] no-gzip <br/> &nbsp;<br/># MSIE masquerades as Netscape, but it is fine <br/># BrowserMatch bMSIE !no-gzip !gzip-only-text/html <br/> &nbsp;<br/># NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48 <br/># the above regex won't work. You can use the following <br/># workaround to get the desired effect: <br/>BrowserMatch bMSI[E] !no-gzip !gzip-only-text/html <br/> &nbsp;<br/># Don't compress images <br/>SetEnvIfNoCase Request_URI .(?:gif&#124;jpe?g&#124;png&#124;ico)$ no-gzip dont-vary <br/> &nbsp;<br/># Make sure proxies don't deliver the wrong content <br/>#Header append Vary User-Agent env=!dont-vary <br/></Location> <br/> &nbsp;<br/>DeflateFilterNote ratio <br/>LogFormat '"%v %h %l %u %t "%r" %>s %b "%&#123;Referer&#125;i" "%&#123;User-Agent&#125;i"" (%&#123;ratio&#125;n)' deflate <br/> &nbsp;<br/>CustomLog logs/deflate_log deflate <br/><br/><br/> <br/><br/><br/> <br/><br/><br/>D.检查一下配置文件中是否有一下模块, 如没有则加上去 <br/><br/><br/><br/>LoadModule evasive20_module &nbsp; modules/mod_evasive20.so <br/><br/><br/><br/>LoadModule gzip_module &nbsp; &nbsp; &nbsp; &nbsp;modules/mod_gzip.so <br/><br/><br/><br/>LoadModule security_module &nbsp; &nbsp; &nbsp; &nbsp;modules/mod_security.so <br/><br/><br/><br/><br/>E.添加一段mod_security的配置文件 <br/><br/><br/><br/>代码: <br/><br/><br/> <br/><br/><IfModule mod_security.c> <br/>SecFilterEngine On <br/>SecFilterCheckURLEncoding On <br/>SecFilterDefaultAction "deny,log,status:500" <br/>#SecFilterForceByteRange 32 126 <br/>#SecFilterScanPOST On <br/>SecAuditLog logs/audit_log <br/>### <br/>SecFilter "../" <br/>##### <br/>SecFilter /etc/*passwd <br/>SecFilter /bin/*sh <br/><br/>#for css attack <br/>SecFilter "<( &#124; )*script" <br/>SecFilter "<(.&#124; )+>" <br/>#for sql attack <br/>SecFilter "delete[ ]+from" <br/>SecFilter "insert[ ]+into" <br/>SecFilter "select.+from" <br/>SecFilter "union[ ]+from" <br/>SecFilter "drop[ ]" <br/></IfModule> <br/><br/><br/>F.添加一段mod_evasive20的配置文件 <br/><br/><br/><br/>代码: <br/><br/><br/> <br/><br/><IfModule mod_evasive20.c><br/> &nbsp; &nbsp;DOSHashTableSize &nbsp; &nbsp;3097<br/> &nbsp; &nbsp;DOSPageCount &nbsp; &nbsp; &nbsp; &nbsp;2<br/> &nbsp; &nbsp;DOSSiteCount &nbsp; &nbsp; &nbsp; &nbsp;50<br/> &nbsp; &nbsp;DOSPageInterval &nbsp; &nbsp; 1<br/> &nbsp; &nbsp;DOSSiteInterval &nbsp; &nbsp; 1<br/> &nbsp; &nbsp;DOSBlockingPeriod &nbsp; 10<br/></IfModule> <br/> <br/><br/>G. 添加一段mod_gzip.c的配置文件 <br/><br/><br/><br/>代码: <br/><br/><br/> <br/><br/>mod_gzip_on Yes <br/><br/><br/><br/>mod_gzip_minimum_file_size 1002 <br/><br/><br/><br/>mod_gzip_maximum_file_size 0 <br/><br/><br/><br/>mod_gzip_maximum_inmem_size 60000 <br/><br/><br/><br/>mod_gzip_item_include mime "application/x-httpd-php" <br/><br/><br/><br/>mod_gzip_item_include mime "text/*" <br/><br/><br/><br/># 压缩 Zope 的内容： <br/><br/><br/><br/>mod_gzip_item_include file "[^.]*$" <br/><br/><br/><br/>mod_gzip_item_include mime "httpd/unix-directory" <br/><br/><br/><br/>mod_gzip_dechunk Yes <br/><br/><br/><br/>mod_gzip_temp_dir "/tmp" <br/><br/><br/><br/>mod_gzip_keep_workfiles No <br/><br/><br/><br/>mod_gzip_item_include file ".php$" <br/><br/><br/><br/>mod_gzip_item_include file ".txt$" <br/><br/><br/><br/>mod_gzip_item_include file ".html$" <br/><br/><br/><br/>mod_gzip_item_exclude file ".css$" <br/><br/><br/><br/>mod_gzip_item_exclude file ".js$" <br/><br/><br/>H.加个VirtualHost <br/><br/><br/><br/>NameVirtualHost *:80 <br/><br/><br/><br/><VirtualHost *:80> <br/><br/><br/><br/> &nbsp; &nbsp;ServerName <a href="http://www.irunnet.com" target="_blank">www.irunnet.com</a> <br/><br/><br/><br/> &nbsp; &nbsp;DocumentRoot /usr/local/apps/www/cacti <br/><br/><br/><br/> &nbsp; &nbsp;ErrorLog /dev/null <br/><br/><br/><br/> &nbsp; &nbsp;CustomLog /dev/null common <br/><br/><br/><br/></VirtualHost> <br/><br/><br/>2、测试PHP<br/><br/>在/usr/local/apps/www/cacti 创建文件phpinfo.php 内容为： <br/><br/><br/><br/>代码: <br/><br/><br/> <br/><?php <br/>echo phpinfo(); <br/>?> <br/><br/><br/>在浏览器中打开 <a href="http://www.irunnet.com/" target="_blank">http://www.irunnet.com/</a>******/phpinfo.php 如果你能看到 phpinfo 界面那么ok。<br/>这里对PHP.ini配置文件根据开发需求简单改改 <br/><br/><br/><br/>memory_limit = 50M <br/><br/><br/><br/>display_errors = Off <br/><br/><br/><br/>log_errors = Off <br/><br/><br/><br/>log_errors_max_len = 10240 <br/><br/><br/><br/>error_log = /usr/local/apps/www/log <br/><br/><br/><br/>post_max_size = 30M <br/><br/><br/><br/>upload_max_filesize = 50M <br/><br/><br/>3.mysql配置 [这个步骤请有经验的人操作，主要在安全方面设置，仅供参考！] <br/><br/>chown root:sys /etc/my.cnf <br/>chmod 644 /etc/my.cnf <br/><br/>使用用户mysql来启动我们的mysql: <br/># /usr/local/mysql/bin/mysqld_safe -user=mysql & <br/><br/>(1) 修改root用户的的口令 <br/>缺省安装的mysql是没有密码的，所以我们要修改，以防万一。下面采用三种方式来修改root的口令。 <br/><br/>* &nbsp;用mysqladmin命令来改root用户口令 <br/>＃ mysqladmin -uroot password test <br/>这样，MySQL数据库root用户的口令就被改成test了。（test只是举例，我们实际使用的口令一定不能使用这种易猜的弱口令） <br/><br/>* &nbsp;用set password修改口令： <br/>mysql> set password for root@localhost=password('test'); <br/>这时root用户的口令就被改成test了。 <br/><br/>* &nbsp;直接修改user表的root用户口令 &nbsp; &nbsp; <br/>mysql> use mysql; <br/>mysql> update user set password=password('test') where user='root'; <br/>mysql> flush privileges; <br/><br/>这样，MySQL数据库root用户的口令也被改成test了。其中最后一句命令flush privileges的意思是强制刷新内存授权表，否则用的还是缓冲中的口令，这时非法用户还可以用root用户及空口令登陆，直到重启MySQL服务器。 <br/><br/>(2) 删除默认的数据库和用户 <br/>我们的数据库是在本地，并且也只需要本地的php脚本对mysql进行读取，所以很多用户不需要。mysql初始化后会自动生成空用户和test库，这会对数据库构成威胁，我们全部删除。 <br/>我们使用mysql客户端程序连接到本地的mysql服务器后出现如下提示： <br/>mysql> drop database test; <br/>mysql> use mysql; <br/>mysql> delete from db; <br/>mysql> delete from user where not(host="localhost" and user="root"); <br/>mysql> flush privileges; <br/><br/>(3) 改变默认mysql管理员的名称 <br/>这个工作是可以选择的，根据个人习惯，因为默认的mysql的管理员名称是root，所以如果能够修改的话，能够防止一些脚本小子对系统的穷举。我们可以直接修改数据库，把root用户改为"admin" <br/>mysql> use mysql; <br/>mysql> update user set user="admin" where user="root"; <br/>mysql> flush privileges; <br/><br/>(4) 提高本地安全性 <br/>提高本地安全性，主要是防止mysql对本地文件的存取，比如黑客通过mysql把/etc/passwd获取了，会对系统构成威胁。mysql对本地文件的存取是通过SQL语句来实现，主要是通过Load DATA LOCAL INFILE来实现，我们能够通过禁用该功能来防止黑客通过SQL注射等获取系统核心文件。 <br/>禁用该功能必须在 my.cnf 的[mysqld]部分加上一个参数： <br/>set-variable=local-infile=0 <br/><br/>(5) 禁止远程连接mysql <span style="color: #FF0000;">【根据开发需求】</span><br/>因为我们的mysql只需要本地的php脚本进行连接，所以我们无需开socket进行监听，那么我们完全可以关闭监听的功能。 <br/>有两个方法实现： <br/>* 配置my.cnf文件，在[mysqld]部分添加 skip-networking 参数 <br/>* mysqld服务器中参数中添加 --skip-networking 启动参数来使mysql不监听任何TCP/IP连接，增加安全性。如果要进行mysql的管理的话,可以在服务器本地安装一个phpMyadmin来进行管理。 <br/><br/>(6) 控制数据库访问权限<span style="color: #FF0000;">【根据开发需求】</span><br/>对于使用php脚本来进行交互，最好建立一个用户只针对某个库有 update、select、delete、insert、drop table、create table等权限，这样就很好避免了数据库用户名和密码被黑客查看后最小损失。 <br/>比如下面我们创建一个数据库为db1，同时建立一个用户test1能够访问该数据库。 <br/>mysql> create database db1; <br/>mysql> grant select,insert,update,delete,create,drop privileges on db1.* to test1@localhost identified by 'admindb'; <br/>以上SQL是创建一个数据库db1，同时增加了一个test1用户，口令是admindb，但是它只能从本地连接mysql，对db1库有select,insert,update,delete,create,drop操作权限。 <br/><br/>(7) 限制一般用户浏览其他用户数据库 <br/>如果有多个数据库，每个数据库有一个用户，那么必须限制用户浏览其他数据库内容，可以在启动MySQL服务器时加--skip-show-database 启动参数就能够达到目的。 <br/><br/>( 忘记mysql密码的解决办法 <br/>如果不慎忘记了MySQL的root密码，我们可以在启动MySQL服务器时加上参数--skip-grant-tables来跳过授权表的验证 (./safe_mysqld --skip-grant-tables &)，这样我们就可以直接登陆MySQL服务器，然后再修改root用户的口令，重启MySQL就可以用新口令登陆了。 <br/><br/>(9) 数据库文件的安全 <br/>我们默认的mysql是安装在/usr/local/mysql目录下的，那么对应的数据库文件就是在/usr/local/mysql/var目录下，那么我们要保证该目录不能让未经授权的用户访问后把数据库打包拷贝走了，所以要限制对该目录的访问。 <br/>我们修改该目录的所属用户和组是mysql，同时改变访问权限： <br/># chown -R mysql.mysql /usr/local/mysql/var <br/># chmod -R go-rwx /usr/local/mysql/var <br/><br/>(10) 删除历史记录 <br/>执行以上的命令会被shell记录在历史文件里，比如bash会写入用户目录的.bash_history文件，如果这些文件不慎被读，那么数据库的密码就会泄漏。用户登陆数据库后执行的SQL命令也会被MySQL记录在用户目录的.mysql_history文件里。如果数据库用户用SQL语句修改了数据库密码，也会因.mysql_history文件而泄漏。所以我们在shell登陆及备份的时候不要在-p后直接加密码，而是在提示后再输入数据库密码。 <br/>另外这两个文件我们也应该不让它记录我们的操作，以防万一。 <br/># rm .bash_history .mysql_history <br/># ln -s /dev/null .bash_history <br/># ln -s /dev/null .mysql_history <br/><br/>(11) 其他 <br/>另外还可以考虑使用chroot等方式来控制mysql的运行目录，更好的控制权限，具体可以参考相关文章。<br/><br/><br/><br/>my.cnf的调试参数 <br/>--------------------------------------------------------------------------------<br/><br/>--join_buffer_size=1044480(1m) <br/>The size of the buffer that is used for full joins.<br/><br/>--key_buffer_size=256M<br/>The size of the buffer used for index blocks. Increase<br/>this to get better index handling (for all reads and<br/>multiple writes) to as much as you can afford; 64M on a<br/>256M machine that mainly runs MySQL is quite common.<br/><br/>--max_write_lock_count=# <br/>After this many write locks, allow some read locks to run<br/>in between.<br/><br/>--myisam_sort_buffer_size=64M <br/>The buffer that is allocated when sorting the index when<br/>doing a REPAIR or when creating indexes with CREATE INDEX<br/>or ALTER TABLE.<br/><br/>--read_buffer_size=1M <br/>Each thread that does a sequential scan allocates a<br/>buffer of this size for each table it scans. If you do<br/>many sequential scans, you may want to increase this<br/>value.<br/><br/>--sort_buffer_size=64M<br/>Each thread that needs to do a sort allocates a buffer of<br/>this size.<br/><br/>--table_cache=1024 The number of open tables for all threads.<br/><br/>--tmp_table_size=33M <br/>if an in-memory temporary table exceeds this size, MySQL<br/>will automatically convert it to an on-disk MyISAM table.<br/><br/>--max_tmp_tables=# Maximum number of temporary tables a client can keep open<br/>at a time.<br/><br/><br/>--max_write_lock_count=# <br/>After this many write locks, allow some read locks to run<br/>in between.<br/><br/><br/><br/>--thread_concurrency=# <br/>Permits the application to give the threads system a hint<br/>for the desired number of threads that should be run at<br/>the same time.<br/><br/>--thread_cache_size=# <br/>How many threads we should keep in a cache for reuse<br/>Tags - <a href="http://blog.soueasy.net/tags/linux%252Funix/" rel="tag">linux/unix</a>
]]>
</description>
</item><item>
<link>http://blog.soueasy.net/post//#blogcomment</link>
<title><![CDATA[[评论] apache2+php+mysql+mod_secu+mod_evasive+mod_gzip+snmp＋rrdtool+cacti ]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://blog.soueasy.net/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>