<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>C1G军火库</title>
	<atom:link href="http://blog.c1gstudio.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.c1gstudio.com</link>
	<description>关注互联网、网页设计、Web开发、服务器运维优化、项目管理、网站运营...</description>
	<pubDate>Thu, 12 Jan 2012 06:03:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>给PHP5.2.*打上Hash冲突漏洞补丁</title>
		<link>http://blog.c1gstudio.com/archives/1307</link>
		<comments>http://blog.c1gstudio.com/archives/1307#comments</comments>
		<pubDate>Thu, 12 Jan 2012 06:03:24 +0000</pubDate>
		<dc:creator>C1G</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[补丁]]></category>

		<guid isPermaLink="false">http://blog.c1gstudio.com/?p=1307</guid>
		<description><![CDATA[PHP5.2.*通过构造Hash冲突可以实现拒绝服务攻击,针对此漏洞官方发布了PHP 5.3.9但不会为此发布PHP 5.2.18.
5.2.* 可以打上下面的patch来解决此问题.
https://github.com/laruence/laruence.github.com/tree/master/php-5.2-max-input-vars
目前已知的受影响的语言以及版本有::
Java, 所有版本
JRuby > /etc/ld.so.conf
ldconfig -v
eAccelerator出错
[eAccelerator] This build of “eAccelerator” was compiled for PHP version 5.2.14. Rebuild it for your PHP version (5.2.17p1) or download precompiled binaries.
重新编译eAccelerator
参考:
http://www.laruence.com/2011/12/29/2412.html
]]></description>
			<content:encoded><![CDATA[<p>PHP5.2.*通过构造Hash冲突可以实现拒绝服务攻击,针对此漏洞官方发布了PHP 5.3.9但不会为此发布PHP 5.2.18.<br />
5.2.* 可以打上下面的patch来解决此问题.</p>
<p>https://github.com/laruence/laruence.github.com/tree/master/php-5.2-max-input-vars</p>
<p>目前已知的受影响的语言以及版本有::</p>
<p>Java, 所有版本</p>
<p>JRuby <= 1.6.5</p>
<p>PHP <= 5.3.8, <= 5.4.0RC3</p>
<p>Python, 所有版本</p>
<p>Rubinius, 所有版本</p>
<p>Ruby <= 1.8.7-p356</p>
<p>Apache Geronimo, 所有版本</p>
<p>Apache Tomcat <= 5.5.34, <= 6.0.34, <= 7.0.22</p>
<p>Oracle Glassfish <= 3.1.1</p>
<p>Jetty, 所有版本</p>
<p>Plone, 所有版本</p>
<p>Rack, 所有版本</p>
<p>V8 JavaScript Engine, 所有版本</p>
<p>不受此影响的语言或者修复版本的语言有::</p>
<p>PHP >= 5.3.9, >= 5.4.0RC4</p>
<p>JRuby >= 1.6.5.1</p>
<p>Ruby >= 1.8.7-p357, 1.9.x</p>
<p>Apache Tomcat >= 5.5.35, >= 6.0.35, >= 7.0.23</p>
<p>Oracle Glassfish, N/A (Oracle reports that the issue is fixed in the main codeline and scheduled for a future CPU)</p>
<p>将php从5.2.14升级到5.2.17并打上补丁<br />
下载patch<br />
https://github.com/laruence/laruence.github.com/zipball/master</p>
<p>到之前的php编译目录</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">cd src/lempelf/package/</li>
<li>wget http://www.php.net/get/php-5.2.17.tar.gz/from/kr.php.net/mirror</li>
<li>wget http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz</li>
<li>&nbsp;</li>
<li>tar zxvf php-5.2.17.tar.gz </li>
<li>gzip -cd php-5.2.17-fpm-0.5.14.diff.gz |patch -d php-5.2.17 -p1</li></ol></div>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">patching file configure</li>
<li>Hunk #7 succeeded at 110645 (offset 1324 lines).</li>
<li>Hunk #9 succeeded at 119634 (offset 1324 lines).</li>
<li>patching file configure.in</li>
<li>patching file libevent/ChangeLog</li>
<li>patching file libevent/Makefile.am</li>
<li>patching file libevent/Makefile.in</li>
<li>patching file libevent/README</li>
<li>patching file libevent/aclocal.m4</li>
<li>patching file libevent/autogen.sh</li>
<li>patching file libevent/buffer.c</li>
<li>patching file libevent/compat/sys/_time.h</li>
<li>patching file libevent/compat/sys/queue.h</li>
<li>patching file libevent/config.h.in</li>
<li>patching file libevent/configure</li>
<li>patching file libevent/configure.in</li>
<li>patching file libevent/depcomp</li>
<li>patching file libevent/devpoll.c</li>
<li>patching file libevent/epoll.c</li>
<li>patching file libevent/epoll_sub.c</li>
<li>patching file libevent/evbuffer.c</li>
<li>patching file libevent/event-config.h</li>
<li>patching file libevent/event-fpm.h</li>
<li>patching file libevent/event-internal.h</li>
<li>patching file libevent/event.3</li>
<li>patching file libevent/event.c</li>
<li>patching file libevent/event.h</li>
<li>patching file libevent/evhttp.h</li>
<li>patching file libevent/evport.c</li>
<li>patching file libevent/evsignal.h</li>
<li>patching file libevent/evutil.c</li>
<li>patching file libevent/evutil.h</li>
<li>patching file libevent/http-internal.h</li>
<li>patching file libevent/http.c</li>
<li>patching file libevent/install-sh</li>
<li>patching file libevent/kqueue.c</li>
<li>patching file libevent/log.c</li>
<li>patching file libevent/log.h</li>
<li>patching file libevent/min_heap.h</li>
<li>patching file libevent/missing</li>
<li>patching file libevent/poll.c</li>
<li>patching file libevent/select.c</li>
<li>patching file libevent/signal.c</li>
<li>patching file libevent/strlcpy-internal.h</li>
<li>patching file libevent/strlcpy.c</li>
<li>patching file main/php_config.h.in</li>
<li>patching file sapi/cgi/Makefile.frag</li>
<li>patching file sapi/cgi/cgi_main.c</li>
<li>patching file sapi/cgi/config9.m4</li>
<li>patching file sapi/cgi/fastcgi.c</li>
<li>patching file sapi/cgi/fastcgi.h</li>
<li>patching file sapi/cgi/fpm/Makefile.frag</li>
<li>patching file sapi/cgi/fpm/acinclude.m4</li>
<li>patching file sapi/cgi/fpm/conf/php-fpm.conf.in</li>
<li>patching file sapi/cgi/fpm/config.m4</li>
<li>patching file sapi/cgi/fpm/fpm.c</li>
<li>patching file sapi/cgi/fpm/fpm.h</li>
<li>patching file sapi/cgi/fpm/fpm_arrays.h</li>
<li>patching file sapi/cgi/fpm/fpm_atomic.h</li>
<li>patching file sapi/cgi/fpm/fpm_autoconf.h.in</li>
<li>patching file sapi/cgi/fpm/fpm_children.c</li>
<li>patching file sapi/cgi/fpm/fpm_children.h</li>
<li>patching file sapi/cgi/fpm/fpm_cleanup.c</li>
<li>patching file sapi/cgi/fpm/fpm_cleanup.h</li>
<li>patching file sapi/cgi/fpm/fpm_clock.c</li>
<li>patching file sapi/cgi/fpm/fpm_clock.h</li>
<li>patching file sapi/cgi/fpm/fpm_conf.c</li>
<li>patching file sapi/cgi/fpm/fpm_conf.h</li>
<li>patching file sapi/cgi/fpm/fpm_config.h</li>
<li>patching file sapi/cgi/fpm/fpm_env.c</li>
<li>patching file sapi/cgi/fpm/fpm_env.h</li>
<li>patching file sapi/cgi/fpm/fpm_events.c</li>
<li>patching file sapi/cgi/fpm/fpm_events.h</li>
<li>patching file sapi/cgi/fpm/fpm_php.c</li>
<li>patching file sapi/cgi/fpm/fpm_php.h</li>
<li>patching file sapi/cgi/fpm/fpm_php_trace.c</li>
<li>patching file sapi/cgi/fpm/fpm_php_trace.h</li>
<li>patching file sapi/cgi/fpm/fpm_process_ctl.c</li>
<li>patching file sapi/cgi/fpm/fpm_process_ctl.h</li>
<li>patching file sapi/cgi/fpm/fpm_request.c</li>
<li>patching file sapi/cgi/fpm/fpm_request.h</li>
<li>patching file sapi/cgi/fpm/fpm_shm.c</li>
<li>patching file sapi/cgi/fpm/fpm_shm.h</li>
<li>patching file sapi/cgi/fpm/fpm_shm_slots.c</li>
<li>patching file sapi/cgi/fpm/fpm_shm_slots.h</li>
<li>patching file sapi/cgi/fpm/fpm_signals.c</li>
<li>patching file sapi/cgi/fpm/fpm_signals.h</li>
<li>patching file sapi/cgi/fpm/fpm_sockets.c</li>
<li>patching file sapi/cgi/fpm/fpm_sockets.h</li>
<li>patching file sapi/cgi/fpm/fpm_stdio.c</li>
<li>patching file sapi/cgi/fpm/fpm_stdio.h</li>
<li>patching file sapi/cgi/fpm/fpm_str.h</li>
<li>patching file sapi/cgi/fpm/fpm_trace.c</li>
<li>patching file sapi/cgi/fpm/fpm_trace.h</li>
<li>patching file sapi/cgi/fpm/fpm_trace_mach.c</li>
<li>patching file sapi/cgi/fpm/fpm_trace_pread.c</li>
<li>patching file sapi/cgi/fpm/fpm_trace_ptrace.c</li>
<li>patching file sapi/cgi/fpm/fpm_unix.c</li>
<li>patching file sapi/cgi/fpm/fpm_unix.h</li>
<li>patching file sapi/cgi/fpm/fpm_worker_pool.c</li>
<li>patching file sapi/cgi/fpm/fpm_worker_pool.h</li>
<li>patching file sapi/cgi/fpm/init.d/php-fpm.in</li>
<li>patching file sapi/cgi/fpm/xml_config.c</li>
<li>patching file sapi/cgi/fpm/xml_config.h</li>
<li>patching file sapi/cgi/fpm/zlog.c</li>
<li>patching file sapi/cgi/fpm/zlog.h</li></ol></div>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">unzip laruence-laruence.github.com-43969a1.zip</li>
<li>cd php-5.2.17</li>
<li>&nbsp;</li>
<li>patch -p1 &lt; ../laruence-laruence.github.com-43969a1/php-5.2-max-input-vars/php-5.2.17-max-input-vars.patch</li></ol></div>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">patching file configure</li>
<li>Hunk #1 succeeded at 2176 (offset 11 lines).</li>
<li>patching file configure.in</li>
<li>patching file main/main.c</li>
<li>patching file main/php_globals.h</li>
<li>patching file main/php_variables.c</li>
<li>patching file main/php_version.h</li></ol></div>
<p>打好补丁,重编译一遍php</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">./configure --prefix=/opt/php-5.2.17p1 --with-config-file-path=/opt/php-5.2.17p1/etc --with-mysql=/opt/mysql --with-mysqli=/opt/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap&nbsp; --enable-xml --enable-zend-multibyte --disable-debug --disable-ipv6&nbsp; </li>
<li>make ZEND_EXTRA_LIBS='-liconv'</li>
<li>make install</li>
<li>&nbsp;</li>
<li>cd ../memcache-3.0.5</li>
<li>make clean</li>
<li>/opt/php-5.2.17p1/bin/phpize </li>
<li>./configure --with-php-config=/opt/php-5.2.17p1/bin/php-config </li>
<li>make </li>
<li>make install</li>
<li>&nbsp;</li>
<li>cd ../eaccelerator-0.9.6.1</li>
<li>make clean</li>
<li>/opt/php-5.2.17p1/bin/phpize</li>
<li>./configure --enable-eaccelerator=shared --with-php-config=/opt/php-5.2.17p1/bin/php-config</li>
<li>make </li>
<li>make install </li>
<li>&nbsp;</li>
<li>&nbsp;</li>
<li>cd ../PDO_MYSQL-1.0.2</li>
<li>make clean</li>
<li>/opt/php-5.2.17p1/bin/phpize </li>
<li>./configure --with-php-config=/opt/php-5.2.17p1/bin/php-config --with-pdo-mysql=/opt/mysql</li>
<li>make </li>
<li>make install</li>
<li>&nbsp;</li>
<li>&nbsp;</li>
<li>cd ../imagick-2.2.2/</li>
<li>make clean</li>
<li>/opt/php-5.2.17p1/bin/phpize </li>
<li>./configure --with-php-config=/opt/php-5.2.17p1/bin/php-config</li>
<li>make</li>
<li>make install</li>
<li>&nbsp;</li>
<li>#32位用下面</li>
<li>cp ../ZendOptimizer-3.3.9-linux-glibc23-i386/data/5_2_x_comp/ZendOptimizer.so /opt/php-5.2.17p1/lib/php/extensions/no-debug-non-zts-20060613/</li>
<li>#64位用下面</li>
<li>cp ../ZendOptimizer-3.3.9-linux-glibc23-x86_64/data/5_2_x_comp/ZendOptimizer.so /opt/php-5.2.17p1/lib/php/extensions/no-debug-non-zts-20060613/</li>
<li>&nbsp;</li>
<li>&nbsp;</li>
<li>mkdir -p /opt/php-5.2.17p1/eaccelerator_cache</li>
<li>chown www:website /opt/php-5.2.17p1/eaccelerator_cache/</li>
<li>chmod 770 /opt/php-5.2.17p1/eaccelerator_cache/</li>
<li>&nbsp;</li>
<li>touch /opt/php-5.2.17p1/logs/php_error.log</li>
<li>chown www:website /opt/php-5.2.17p1/logs/php_error.log </li>
<li>chmod 770 /opt/php-5.2.17p1/logs/php_error.log </li>
<li>&nbsp;</li>
<li>#升级pear (可选)</li>
<li>/opt/php-5.2.17p1/bin/pear upgrade pear</li>
<li>/opt/php-5.2.17p1/bin/pear install Benchmark Cache_Lite DB HTTP Mail Mail_Mime Net_SMTP Net_Socket Pager XML_Parser XML_RPC</li>
<li>&nbsp;</li>
<li>cp -p /opt/php/etc/php.ini /opt/php-5.2.17p1/etc/</li>
<li>cp -p /opt/php/etc/php-fpm.conf /opt/php-5.2.17p1/etc/</li>
<li>chown root:website /opt/php-5.2.17p1/etc/*</li>
<li>chmod 660 /opt/php-5.2.17p1/etc/*</li>
<li>&nbsp;</li>
<li>/opt/php/sbin/php-fpm stop</li>
<li>#删掉软连接,切换php</li>
<li>rm /opt/php</li>
<li>ln -s /opt/php-5.2.17p1/ /opt/php</li>
<li>/opt/php/sbin/php-fpm start</li></ol></div>
<p>注意phpfpm.conf,php.ini中的路径</p>
<p>找不到libmysqlclient.so.16</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">./conftest: error while loading shared libraries: libmysqlclient.so.16</li></ol></div>
<p>echo /opt/mysql/lib/mysql >> /etc/ld.so.conf<br />
ldconfig -v</p>
<p>eAccelerator出错</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">[eAccelerator] This build of “eAccelerator” was compiled for PHP version 5.2.14. Rebuild it for your PHP version (5.2.17p1) or download precompiled binaries.</li></ol></div>
<p>重新编译eAccelerator</p>
<p>参考:<br />
http://www.laruence.com/2011/12/29/2412.html</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.c1gstudio.com/archives/1307/feed</wfw:commentRss>
		</item>
		<item>
		<title>mysql5.1.26rc升级至Percona mysql5.5.17</title>
		<link>http://blog.c1gstudio.com/archives/1299</link>
		<comments>http://blog.c1gstudio.com/archives/1299#comments</comments>
		<pubDate>Fri, 16 Dec 2011 03:52:48 +0000</pubDate>
		<dc:creator>C1G</dc:creator>
		
		<category><![CDATA[Mysql]]></category>

		<category><![CDATA[innodb]]></category>

		<category><![CDATA[mysql]]></category>

		<category><![CDATA[mysql upgrade]]></category>

		<category><![CDATA[percona]]></category>

		<guid isPermaLink="false">http://blog.c1gstudio.com/?p=1299</guid>
		<description><![CDATA[mysql5.5 比mysql5.1有更快的innodb,更好的多核支持,加强的复制功能,这正是我看中的.
Percona-Server是MySQL的衍生版，在功能和性能上较官方MySQL 又有着很显著的提升.
Percona版和官方mysql.5.5.17下编出中文支持需用
-DWITH_EXTRA_CHARSETS=all
下面参数无法编出
-DWITH_EXTRA_CHARSETS:STRING=utf8,gbk
官方mysql.5.5.18两个参数都无法编译出中文支持...
5.5起使用cmake编译,可以用yum安装
5.6也可用此安装
wget http://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.17-22.1/source/Percona-Server-5.5.17-rel22.1.tar.gz
tar zxvf Percona-Server-5.5.17-rel22.1.tar.gz 
cd Percona-Server-5.5.17-rel22.1
CC=gcc CFLAGS=&#34;-DBIG_JOINS=1 -DHAVE_DLOPEN=1 -O3&#34; CXX=g++ CXXFLAGS=&#34;-DBIG_JOINS=1 -DHAVE_DLOPEN=1 -felide-constructors -fno-rtti -O3&#34;
cmake . \
&#160; -DCMAKE_BUILD_TYPE:STRING=Release&#160; &#160; &#160; &#160; &#160; &#160; &#160;\
&#160; -DSYSCONFDIR:PATH=/opt/mysql-5.5.17-22.1&#160; &#160; &#160; &#160; &#160; &#160; \
&#160; -DCMAKE_INSTALL_PREFIX:PATH=/opt/mysql-5.5.17-22.1&#160; \
&#160; -DENABLED_PROFILING:BOOL=ON&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;\
&#160; -DENABLE_DEBUG_SYNC:BOOL=OFF&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; \
&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>mysql5.5 比mysql5.1有更快的innodb,更好的多核支持,加强的复制功能,这正是我看中的.<br />
Percona-Server是MySQL的衍生版，在功能和性能上较官方MySQL 又有着很显著的提升.</p>
<p>Percona版和官方mysql.5.5.17下编出中文支持需用<br />
-DWITH_EXTRA_CHARSETS=all<br />
下面参数无法编出<br />
-DWITH_EXTRA_CHARSETS:STRING=utf8,gbk<br />
官方mysql.5.5.18两个参数都无法编译出中文支持...<br />
5.5起使用cmake编译,可以用yum安装<br />
5.6也可用此安装</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">wget http://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.17-22.1/source/Percona-Server-5.5.17-rel22.1.tar.gz</li>
<li>tar zxvf Percona-Server-5.5.17-rel22.1.tar.gz </li>
<li>cd Percona-Server-5.5.17-rel22.1</li>
<li>CC=gcc CFLAGS=&quot;-DBIG_JOINS=1 -DHAVE_DLOPEN=1 -O3&quot; CXX=g++ CXXFLAGS=&quot;-DBIG_JOINS=1 -DHAVE_DLOPEN=1 -felide-constructors -fno-rtti -O3&quot;</li>
<li>cmake . \</li>
<li>&nbsp; -DCMAKE_BUILD_TYPE:STRING=Release&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\</li>
<li>&nbsp; -DSYSCONFDIR:PATH=/opt/mysql-5.5.17-22.1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \</li>
<li>&nbsp; -DCMAKE_INSTALL_PREFIX:PATH=/opt/mysql-5.5.17-22.1&nbsp; \</li>
<li>&nbsp; -DENABLED_PROFILING:BOOL=ON&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\</li>
<li>&nbsp; -DENABLE_DEBUG_SYNC:BOOL=OFF&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \</li>
<li>&nbsp; -DMYSQL_DATADIR:PATH=/opt/mysql-5.5.17-22.1/var&nbsp; &nbsp; \</li>
<li>&nbsp; -DMYSQL_MAINTAINER_MODE:BOOL=OFF&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \</li>
<li>&nbsp; -DWITH_EXTRA_CHARSETS=all&nbsp; \</li>
<li>&nbsp; -DWITH_BIG_TABLES:BOOL=ON \</li>
<li>&nbsp; -DWITH_FAST_MUTEXES:BOOL=ON \</li>
<li>&nbsp; -DENABLE-PROFILING:BOOL=ON \</li>
<li>&nbsp; -DWITH_SSL:STRING=bundled&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\</li>
<li>&nbsp; -DWITH_UNIT_TESTS:BOOL=OFF&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \</li>
<li>&nbsp; -DWITH_ZLIB:STRING=bundled&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \</li>
<li>&nbsp; -DWITH_PARTITION_STORAGE_ENGINE:BOOL=ON&nbsp; &nbsp; &nbsp; &nbsp;\</li>
<li>&nbsp; -DWITH_PLUGINS=heap,csv,partition,innodb_plugin,myisam \</li>
<li>&nbsp; -DEFAULT_COLLATION=utf8_general_ci&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \</li>
<li>&nbsp; -DEFAULT_CHARSET=utf8&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \</li>
<li>&nbsp; -DENABLED_ASSEMBLER:BOOL=ON&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\</li>
<li>&nbsp; -DENABLED_LOCAL_INFILE:BOOL=ON&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \</li>
<li>&nbsp; -DENABLED_THREAD_SAFE_CLIENT:BOOL=ON&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \</li>
<li>&nbsp; -DENABLED_EMBEDDED_SERVER:BOOL=OFF&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\</li>
<li>&nbsp; -DWITH_CLIENT_LDFLAGS:STRING=all-static&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\</li>
<li>&nbsp; -DINSTALL_LAYOUT:STRING=STANDALONE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \</li>
<li>&nbsp; -DCOMMUNITY_BUILD:BOOL=ON;</li></ol></div>
<p>失败后更改配制操作</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">make clean</li>
<li>rm -f CMakeCache.txt</li></ol></div>
<p>编译安装</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">make</li>
<li>make install</li>
<li>&nbsp;</li>
<li>cp support-files/mysql.server /opt/mysql-5.5.17-22.1/bin/</li>
<li>chown -R mysql:mysql /opt/mysql-5.5.17-22.1</li>
<li>chmod 755 /opt/mysql-5.5.17-22.1/bin/mysql.server </li>
<li>ln -s /opt/mysql-5.5.17-22.1/ /opt/mysql</li></ol></div>
<p>复制5.1全部数据</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">cp -a /opt/mysql-5.1.26rc/var /opt/mysql-5.5.17-22.1/</li></ol></div>
<p>复制5.1的原配置文件启动出错</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">cp /opt/mysql-5.1.26rc/my.cnf /opt/mysql-5.5.17-22.1/</li>
<li>/opt/mysql-5.5.17-22.1/bin/mysqld --skip-grant-tables --user=mysql</li></ol></div>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">111212 15:50:51 [Note] Flashcache bypass: disabled</li>
<li>111212 15:50:51 [Note] Flashcache setup error is : ioctl failed</li>
<li>&nbsp;</li>
<li>111212 15:50:51 [Warning] option 'innodb-autoextend-increment': unsigned value 52428800 adjusted to 1000</li>
<li>111212 15:50:51 [Note] Plugin 'InnoDB' is disabled.</li>
<li>111212 15:50:51 [ERROR] bin/mysqld: unknown option '--skip-locking'</li>
<li>111212 15:50:51 [ERROR] Aborting</li>
<li>&nbsp;</li>
<li>111212 15:50:51 [Note] bin/mysqld: Shutdown complete</li></ol></div>
<p>mysql5.5不再支持skip-locking 参数,需从my.cnf中去除;<br />
如果原先用了innodb还需修改参数和实际文件大小一致</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">ls -lh /opt/mysql/var/</li>
<li>-rw-r----- 1 mysql mysql 2030043136 Dec 13 16:55 ibdata1</li>
<li>-rw-r----- 1 mysql mysql&nbsp; &nbsp;67108864 Dec 13 16:55 ib_logfile0</li>
<li>-rw-r----- 1 mysql mysql&nbsp; &nbsp;67108864 Dec 13 16:37 ib_logfile1</li></ol></div>
<p>计算ibdata1 文件大小 2030043136/1024/1024=1936M,ib_logfile=67108864/1024/1024=64M</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">innodb_data_file_path = ibdata1:1936M:autoextend</li>
<li>innodb_log_file_size = 64M</li>
<li>innodb_log_files_in_group = 2</li>
<li>#后面不需要M</li>
<li>innodb-autoextend-increment=50</li></ol></div>
<p>修改过的my.cnf<br />
discuz论坛应用,innodb数据2G左右</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">[client]</li>
<li>port&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 3306</li>
<li>socket&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = /opt/mysql/mysql.sock</li>
<li>[mysqld]</li>
<li>port&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 3306</li>
<li>socket&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = /opt/mysql/mysql.sock</li>
<li>#skip-locking</li>
<li>skip-name-resolve</li>
<li>back_log=100</li>
<li>key_buffer_size = 4128M</li>
<li>query_cache_size = 128M</li>
<li>query_cache_limit = 2M #default=1M</li>
<li>query_cache_min_res_unit = 2k #default=4K</li>
<li>max_allowed_packet = 16M</li>
<li>table_cache = 5096</li>
<li>table_definition_cache = 1024</li>
<li>tmp_table_size = 1792M #default=16M</li>
<li>max_heap_table_size = 512M #default=16M</li>
<li>read_buffer_size = 8M</li>
<li>read_rnd_buffer_size = 32M</li>
<li>sort_buffer_size = 256M</li>
<li>join_buffer_size = 20M</li>
<li>myisam_sort_buffer_size = 256M</li>
<li>thread_cache_size = 80 #default=0</li>
<li>thread_stack = 192K #default=192K</li>
<li>thread_concurrency = 16 #default=10</li>
<li>connect_timeout = 30</li>
<li>max_connection = 500</li>
<li>max_connect_errors = 30</li>
<li>wait_timeout = 30</li>
<li>concurrent_insert=2 #以增加碎片代价提高写入</li>
<li>server-id&nbsp; &nbsp; &nbsp; &nbsp;= 9</li>
<li>innodb_additional_mem_pool_size = 64M</li>
<li>innodb_buffer_pool_size = 4G</li>
<li>innodb_autoextend_increment =50</li>
<li>#ibdata1以实际文件大小代替</li>
<li>innodb_data_file_path = ibdata1:1936M:autoextend</li>
<li>#新增参数</li>
<li>innodb_write_io_threads = 8</li>
<li>#新增参数</li>
<li>innodb_read_io_threads = 8</li>
<li>innodb_thread_concurrency = 16</li>
<li>innodb_flush_log_at_trx_commit = 0</li>
<li>innodb_log_buffer_size = 8M</li>
<li>#log_file和原配置保持一样</li>
<li>innodb_log_file_size = 64M</li>
<li>innodb_log_files_in_group = 2</li>
<li>&nbsp;</li>
<li>innodb_max_dirty_pages_pct = 60</li>
<li>innodb_lock_wait_timeout = 50</li>
<li>#innodb_file_per_table</li>
<li>[mysqldump]</li>
<li>quick</li>
<li>max_allowed_packet = 32M</li>
<li>[mysql]</li>
<li>no-auto-rehash</li>
<li>[isamchk]</li>
<li>key_buffer = 256M</li>
<li>sort_buffer_size = 256M</li>
<li>read_buffer = 8M</li>
<li>write_buffer = 8M</li>
<li>[myisamchk]</li>
<li>key_buffer = 256M</li>
<li>sort_buffer_size = 256M</li>
<li>read_buffer = 8M</li>
<li>write_buffer = 8M</li>
<li>[mysqlhotcopy]</li>
<li>interactive-timeout</li></ol></div>
<p>再次跳过权限表启动</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">/opt/mysql-5.5.17-22.1/bin/mysqld --skip-grant-tables --user=mysql&nbsp; </li>
<li>&nbsp;</li>
<li>111213 16:49:29 [Note] Flashcache bypass: disabled</li>
<li>111213 16:49:29 [Note] Flashcache setup error is : ioctl failed</li>
<li>111213 16:49:29 InnoDB: The InnoDB memory heap is disabled</li>
<li>111213 16:49:29 InnoDB: Mutexes and rw_locks use GCC atomic builtins</li>
<li>111213 16:49:29 InnoDB: Compressed tables use zlib 1.2.3</li>
<li>111213 16:49:29 InnoDB: Initializing buffer pool, size = 4.0G</li>
<li>111213 16:49:30 InnoDB: Completed initialization of buffer pool</li>
<li>111213 16:49:30 InnoDB: highest supported file format is Barracuda.</li>
<li>InnoDB: 127 rollback segment(s) active.</li>
<li>111213 16:49:30&nbsp; InnoDB: Waiting for the background threads to start</li>
<li>111213 16:49:31 Percona XtraDB (http://www.percona.com) 1.1.8-20.1 started; log sequence number 1881683892</li>
<li>111213 16:49:31 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure</li>
<li>111213 16:49:31 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure</li>
<li>111213 16:49:31 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure</li>
<li>111213 16:49:31 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure</li>
<li>111213 16:49:31 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure</li>
<li>111213 16:49:31 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure</li>
<li>111213 16:49:31 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure</li>
<li>111213 16:49:31 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure</li>
<li>111213 16:49:31 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure</li>
<li>111213 16:49:31 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure</li>
<li>111213 16:49:31 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure</li>
<li>111213 16:49:31 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure</li>
<li>111213 16:49:31 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure</li>
<li>111213 16:49:31 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure</li>
<li>111213 16:49:31 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure</li>
<li>111213 16:49:31 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure</li>
<li>111213 16:49:31 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure</li>
<li>111213 16:49:31 [Note] /opt/mysql-5.5.17-22.1/bin/mysqld: ready for connections.</li>
<li>Version: '5.5.17'&nbsp; socket: '/opt/mysql/mysql.sock'&nbsp; port: 3306&nbsp; Source distribution</li></ol></div>
<p>升级</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">/opt/mysql/bin/mysql_upgrade</li>
<li>&nbsp;</li>
<li>Looking for 'mysql' as: /opt/mysql/bin/mysql</li>
<li>Looking for 'mysqlcheck' as: /opt/mysql/bin/mysqlcheck</li>
<li>Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/opt/mysql/mysql.sock' </li>
<li>Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/opt/mysql/mysql.sock' </li>
<li>discuzx.pre_common_addon&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_admincp_cmenu&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_admincp_group&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_admincp_member&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_admincp_perm&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_admincp_session&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_admingroup&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_adminnote&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_advertisement&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_advertisement_custom&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_banned&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_block&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_block_favorite&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_block_item&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_block_item_data&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_block_permission&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_block_pic&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_block_style&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_block_xml&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_cache&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_card&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_card_log&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_card_type&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_credit_log&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_credit_rule&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_credit_rule_log&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_credit_rule_log_field&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_cron&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_district&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_diy_data&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_domain&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_failedlogin&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_friendlink&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_grouppm&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_invite&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_magic&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_magiclog&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_mailcron&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_mailqueue&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_member&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_member_action_log&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_member_connect&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_member_count&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_member_field_forum&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_member_field_home&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_member_grouppm&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_member_log&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_member_magic&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_member_profile&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_member_profile_setting&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_member_security&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_member_stat_field&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_member_stat_fieldcache&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_member_stat_search&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_member_stat_searchcache&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_member_status&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_member_validate&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_member_verify&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_member_verify_info&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_moderate&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_myapp&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_myinvite&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_mytask&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_nav&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_onlinetime&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_onlinetime_bak&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_plugin&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_pluginvar&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_process&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_regip&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_relatedlink&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_report&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_searchindex&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_secquestion&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_session&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_setting&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_smiley&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_sphinxcounter&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_stat&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_statuser&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_style&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_stylevar&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_syscache&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_tag&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_tagitem&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_task&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_taskvar&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_template&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_template_block&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_template_permission&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_uin_black&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_usergroup&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_usergroup_field&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_common_word&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_common_word_type&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_connect_feedlog&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_connect_memberbindlog&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_connect_tlog&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_access&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_activity&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_activityapply&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_announcement&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_attachment&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_attachment_0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_attachment_1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_attachment_2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_attachment_3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_attachment_4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_attachment_5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_attachment_6&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_attachment_7&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_attachment_8&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_attachment_9&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_attachment_unused&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_attachtype&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_bbcode&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_creditslog&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_debate&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_debatepost&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_faq&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_forum&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_forum_threadtable&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_forumfield&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_forumrecommend&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_groupcreditslog&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_groupfield&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_groupinvite&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_grouplevel&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_groupranking&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_groupuser&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_imagetype&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_medal&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_medallog&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_memberrecommend&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_moderator&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_modwork&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_onlinelist&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_order&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_poll&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_polloption&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_pollvoter&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_post&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_post_1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_post_2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_post_tableid&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_postcomment&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_postlog&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_postposition&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_poststick&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_promotion&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_ratelog&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_relatedthread&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_replycredit&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_rsscache&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_spacecache&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_statlog&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_thread&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_threadclass&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_threadimage&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_threadlog&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_threadmod&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_threadpartake&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_threadrush&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_threadtype&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_trade&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_tradecomment&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_tradelog&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_typeoption&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_forum_typeoptionvar&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_typevar&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_forum_warning&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_home_album&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_home_album_category&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_home_appcreditlog&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_home_blacklist&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_home_blog&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_home_blog_category&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_home_blogfield&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_home_class&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_home_click&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_home_clickuser&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_home_comment&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_home_docomment&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_home_doing&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_home_favorite&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_home_feed&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_home_feed_app&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_home_friend&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_home_friend_request&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_home_friendlog&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_home_notification&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_home_pic&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_home_picfield&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_home_poke&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_home_pokearchive&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_home_share&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_home_show&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_home_specialuser&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_home_userapp&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_home_userappfield&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_home_viewlog&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_home_visitor&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_portal_article_content&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_portal_article_count&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_portal_article_related&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_portal_article_title&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_portal_article_trash&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_portal_attachment&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_portal_category&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_portal_category_permission&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_portal_comment&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_portal_rsscache&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>discuzx.pre_portal_topic&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>discuzx.pre_portal_topic_pic&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>mysql.columns_priv&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>mysql.db&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>mysql.event&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>mysql.func&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>mysql.general_log&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>mysql.help_category&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>mysql.help_keyword&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>mysql.help_relation&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>mysql.help_topic&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>mysql.host&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>mysql.ndb_binlog_index&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>mysql.plugin&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>mysql.proc&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>mysql.procs_priv&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>mysql.servers&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>mysql.slow_log&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>mysql.tables_priv&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>mysql.time_zone&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>mysql.time_zone_leap_second&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>mysql.time_zone_name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>mysql.time_zone_transition&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>mysql.time_zone_transition_type&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OK</li>
<li>mysql.user&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OK</li>
<li>Running 'mysql_fix_privilege_tables'...</li>
<li>OK</li></ol></div>
<p>再重启下mysql就可以使用.<br />
mysql5.1的myisam,innodb共享或单表都可以顺利升到5.5.<br />
需注意字符编码,-skip-locking参数,innodb共享池及日志大小.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.c1gstudio.com/archives/1299/feed</wfw:commentRss>
		</item>
		<item>
		<title>mysql InnoDB 版本一览</title>
		<link>http://blog.c1gstudio.com/archives/1296</link>
		<comments>http://blog.c1gstudio.com/archives/1296#comments</comments>
		<pubDate>Fri, 09 Dec 2011 09:08:43 +0000</pubDate>
		<dc:creator>C1G</dc:creator>
		
		<category><![CDATA[Mysql]]></category>

		<category><![CDATA[innodb]]></category>

		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://blog.c1gstudio.com/?p=1296</guid>
		<description><![CDATA[mysql 5.6.3-m6 的innodb版本为 1.2.3
查看版本方法,可以看到大版本

SELECT * FROM information_schema.plugins;
SELECT @@innodb_version;


MySQL 5.5:



MySQL 
Plugin 
Status
Date


5.5.18
1.1.8
GA
11/16/2011


5.5.17
1.1.8
GA
10/19/2011


5.5.16
1.1.8
GA
09/15/2011


5.5.15
1.1.8
GA
07/28/2011


5.5.14
1.1.8
GA
07/05/2011


5.5.13
1.1.7
GA
05/31/2011


5.5.12
1.1.6
GA
05/05/2011


5.5.11
1.1.6
GA
04/07/2011


5.5.10
1.1.5
GA
03/15/2011


5.5.9
1.1.5
GA
02/07/2011


5.5.8
1.1.4
GA
12/03/2010


5.5.7
1.1.3
GA
10/14/2010


5.5.6
1.1.2
GA
09/13/2010


5.5.5
1.1.1
Early Adopter
06/06/2010 *3


5.5.4
1.1.0
Beta
04/09/2010 *2


5.5.3
1.0.6
RC
03/24/2010


5.5.2
1.0.6
RC
02/12/2010


5.5.1
1.0.6
RC
01/04/2010


5.5.0
1.0.5
RC
12/07/2009 *1



*1: The InnoDB Plugin is included in MySQL 5.5 releases as the built-in version of InnoDB.
*2: InnoDB has been upgraded to version 1.1. This version is considered of Beta quality.
*3: InnoDB has been upgraded to version 1.1.1. This version is considered [...]]]></description>
			<content:encoded><![CDATA[<p>mysql 5.6.3-m6 的innodb版本为 1.2.3</p>
<p>查看版本方法,可以看到大版本</p>
<ul>
<li><code class="code">SELECT * FROM information_schema.plugins;</code></li>
<li><code class="code">SELECT @@innodb_version;
<p></code></li>
</ul>
<p><strong>MySQL 5.5:</strong></p>
<table border="0">
<tbody>
<tr>
<td><strong>MySQL </strong></td>
<td><strong>Plugin </strong></td>
<td><strong>Status</strong></td>
<td><strong>Date</strong></td>
</tr>
<tr>
<td>5.5.18</td>
<td>1.1.8</td>
<td>GA</td>
<td>11/16/2011</td>
</tr>
<tr>
<td>5.5.17</td>
<td>1.1.8</td>
<td>GA</td>
<td>10/19/2011</td>
</tr>
<tr>
<td>5.5.16</td>
<td>1.1.8</td>
<td>GA</td>
<td>09/15/2011</td>
</tr>
<tr>
<td>5.5.15</td>
<td>1.1.8</td>
<td>GA</td>
<td>07/28/2011</td>
</tr>
<tr>
<td>5.5.14</td>
<td>1.1.8</td>
<td>GA</td>
<td>07/05/2011</td>
</tr>
<tr>
<td>5.5.13</td>
<td>1.1.7</td>
<td>GA</td>
<td>05/31/2011</td>
</tr>
<tr>
<td>5.5.12</td>
<td>1.1.6</td>
<td>GA</td>
<td>05/05/2011</td>
</tr>
<tr>
<td>5.5.11</td>
<td>1.1.6</td>
<td>GA</td>
<td>04/07/2011</td>
</tr>
<tr>
<td>5.5.10</td>
<td>1.1.5</td>
<td>GA</td>
<td>03/15/2011</td>
</tr>
<tr>
<td>5.5.9</td>
<td>1.1.5</td>
<td>GA</td>
<td>02/07/2011</td>
</tr>
<tr>
<td>5.5.8</td>
<td>1.1.4</td>
<td>GA</td>
<td>12/03/2010</td>
</tr>
<tr>
<td>5.5.7</td>
<td>1.1.3</td>
<td>GA</td>
<td>10/14/2010</td>
</tr>
<tr>
<td>5.5.6</td>
<td>1.1.2</td>
<td>GA</td>
<td>09/13/2010</td>
</tr>
<tr>
<td>5.5.5</td>
<td>1.1.1</td>
<td>Early Adopter</td>
<td>06/06/2010 *<sup>3</sup></td>
</tr>
<tr>
<td>5.5.4</td>
<td>1.1.0</td>
<td>Beta</td>
<td>04/09/2010 *<sup>2</sup></td>
</tr>
<tr>
<td>5.5.3</td>
<td>1.0.6</td>
<td>RC</td>
<td>03/24/2010</td>
</tr>
<tr>
<td>5.5.2</td>
<td>1.0.6</td>
<td>RC</td>
<td>02/12/2010</td>
</tr>
<tr>
<td>5.5.1</td>
<td>1.0.6</td>
<td>RC</td>
<td>01/04/2010</td>
</tr>
<tr>
<td>5.5.0</td>
<td>1.0.5</td>
<td>RC</td>
<td>12/07/2009 *<sup>1</sup></td>
</tr>
</tbody>
</table>
<p><strong>*1:</strong> The InnoDB Plugin is included in MySQL 5.5 releases as the built-in version of InnoDB.</p>
<p><strong>*2:</strong> InnoDB has been upgraded to version 1.1. This version is considered of Beta quality.</p>
<p><strong>*3:</strong> InnoDB has been upgraded to version 1.1.1. This version is considered of “early adopter” quality.</p>
<p><strong>MySQL 5.1:</strong></p>
<table border="0">
<tbody>
<tr>
<td><strong>MySQL </strong></td>
<td><strong>Plugin </strong></td>
<td><strong>Status </strong></td>
<td><strong>Date</strong></td>
</tr>
<tr>
<td>5.1.60</td>
<td>1.0.17</td>
<td>GA</td>
<td>11/16/2011</td>
</tr>
<tr>
<td>5.1.59</td>
<td>1.0.17</td>
<td>GA</td>
<td>09/15/2011</td>
</tr>
<tr>
<td>5.1.58</td>
<td>1.0.17</td>
<td>GA</td>
<td>07/05/2011</td>
</tr>
<tr>
<td>5.1.57</td>
<td>1.0.16</td>
<td>GA</td>
<td>05/05/2011</td>
</tr>
<tr>
<td>5.1.56</td>
<td>1.0.15</td>
<td>GA</td>
<td>03/01/2011</td>
</tr>
<tr>
<td>5.1.55</td>
<td>1.0.15</td>
<td>GA</td>
<td>02/07/2011</td>
</tr>
<tr>
<td>5.1.54</td>
<td>1.0.14</td>
<td>GA</td>
<td>11/26/2010</td>
</tr>
<tr>
<td>5.1.53</td>
<td>1.0.13</td>
<td>GA</td>
<td>11/03/2010</td>
</tr>
<tr>
<td>5.1.52</td>
<td>1.0.13</td>
<td>GA</td>
<td>10/11/2010</td>
</tr>
<tr>
<td>5.1.51</td>
<td>1.0.12</td>
<td>GA</td>
<td>09/10/2010</td>
</tr>
<tr>
<td>5.1.50</td>
<td>1.0.11</td>
<td>GA</td>
<td>08/03/2010</td>
</tr>
<tr>
<td>5.1.49</td>
<td>1.0.10</td>
<td>GA</td>
<td>07/09/2010</td>
</tr>
<tr>
<td>5.1.48</td>
<td>1.0.9</td>
<td>GA</td>
<td>06/02/2010</td>
</tr>
<tr>
<td>5.1.47</td>
<td>1.0.8</td>
<td>GA</td>
<td>05/06/2010</td>
</tr>
<tr>
<td>5.1.46</td>
<td>1.0.7</td>
<td>GA</td>
<td>04/06/2010</td>
</tr>
<tr>
<td>5.1.45</td>
<td>1.0.6</td>
<td>RC</td>
<td>03/01/2010</td>
</tr>
<tr>
<td>5.1.44</td>
<td>1.0.6</td>
<td>RC</td>
<td>02/04/2010</td>
</tr>
<tr>
<td>5.1.43</td>
<td>1.0.6</td>
<td>RC</td>
<td>01/15/2010</td>
</tr>
<tr>
<td>5.1.42</td>
<td>1.0.6</td>
<td>RC</td>
<td>12/15/2009</td>
</tr>
<tr>
<td>5.1.41</td>
<td>1.0.5</td>
<td>RC</td>
<td>11/05/2009 *<sup>4</sup></td>
</tr>
<tr>
<td>5.1.40</td>
<td>1.0.4</td>
<td>Beta</td>
<td>10/06/2009</td>
</tr>
<tr>
<td>5.1.39</td>
<td>1.0.4</td>
<td>Beta</td>
<td>09/04/2009</td>
</tr>
<tr>
<td>5.1.38</td>
<td>1.0.4</td>
<td>Beta</td>
<td>09/01/2009 *<sup>3</sup></td>
</tr>
<tr>
<td>x.x.xx</td>
<td>1.0.3</td>
<td>Alpha</td>
<td>03/11/2009</td>
</tr>
<tr>
<td>x.x.xx</td>
<td>1.0.2</td>
<td>Alpha</td>
<td>12/01/2008</td>
</tr>
<tr>
<td>x.x.xx</td>
<td>1.0.1</td>
<td>Alpha</td>
<td>05/08/2008 *<sup>2</sup></td>
</tr>
<tr>
<td>x.x.xx</td>
<td>1.0.0</td>
<td>Alpha</td>
<td>04/15/2008 *<sup>1</sup></td>
</tr>
</tbody>
</table>
<p><strong>*1:</strong> The initial release of the InnoDB Plugin is based on the built-in InnoDB in MySQL version 5.1.</p>
<p><strong>*2:</strong> These 4 versions (1.0.0 – 1.0.3) were only available as separate downloads.</p>
<p><strong>*3:</strong> 1st Release of Plugin (see *1* below for more details)</p>
<p><strong>*4:</strong> InnoDB Plugin has been upgraded to version 1.0.5. This version is considered of Release Candidate (RC) quality.</p>
<p><strong>MariaDB:</strong></p>
<table border="0">
<tbody>
<tr>
<td><strong>MariaDB </strong></td>
<td><strong>Plugin </strong></td>
<td><strong>Status </strong></td>
<td><strong>Date</strong></td>
<td><strong>Comments</strong></td>
</tr>
<tr>
<td valign="top">5.1.55</td>
<td valign="top">1.0.15</td>
<td valign="top">GA</td>
<td valign="top">03/01/11</td>
<td valign="top">If use InnoDB Plugin</td>
</tr>
<tr>
<td valign="top">5.1.55</td>
<td valign="top">1.0.15-12.5</td>
<td valign="top">GA</td>
<td valign="top">03/01/11</td>
<td valign="top">If use built-in InnoDB, which is XtraDB+ in MariaDB *<sup>1</sup></td>
</tr>
<tr>
<td>5.2.9</td>
<td>1.0.15-12.7</td>
<td>GA</td>
<td>09/22/11</td>
<td></td>
</tr>
<tr>
<td>5.3.2</td>
<td>1.0.15-12.7</td>
<td>GA</td>
<td>10/14/11</td>
<td></td>
</tr>
</tbody>
</table>
<p><strong>*1:</strong> XtraDB+ differs some from XtraDB as it contains even further enhancements on top of XtraDB. Please see the following 2 links for more details on these differences:</p>
<p><a href="http://kb.askmonty.org/en/mariadb-53-asynchronous-io-on-windows-with-innodb">http://kb.askmonty.org/en/mariadb-53-asynchronous-io-on-windows-with-innodb (work by Wlad)</a><br />
<a href="http://www.facebook.com/note.php?note_id=10150211546215933">http://www.facebook.com/note.php?note_id=10150211546215933 (work by KNielsen)</a></p>
<p>There are even some more optimizer additions, but no graphs yet to report.<br />
<strong>Changelogs:</strong></p>
<p><strong><em>Note:</em></strong> The plugin versions had their own changelogs initially, but eventually the changes were just mixed into the general changelogs for the MySQL Server.</p>
<p><strong><em>Note:</em></strong> Also, some plugin versions span multiple MySQL versions, so those have multiple links below.</p>
<p><strong>Plugin 1.0:</strong></p>
<pre>1.0.0	<a href="http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-100.html">http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-100.html</a>
1.0.1	<a href="http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-101.html">http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-101.html</a>
1.0.2	<a href="http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-102.html">http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-102.html</a>
1.0.3	<a href="http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-103.html">http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-103.html</a>
1.0.4	<a href="http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-104.html">http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-104.html</a>
1.0.5	<a href="http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-105.html">http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-105.html</a>
1.0.6	<a href="http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-106.html">http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-106.html</a>
1.0.7	<a href="http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-107.html">http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-107.html</a>
1.0.8	<a href="http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-108.html">http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes-108.html</a>
1.0.9	<a href="http://dev.mysql.com/doc/refman/5.1/en/news-5-1-48.html">http://dev.mysql.com/doc/refman/5.1/en/news-5-1-48.html</a>
1.0.10	<a href="http://dev.mysql.com/doc/refman/5.1/en/news-5-1-49.html">http://dev.mysql.com/doc/refman/5.1/en/news-5-1-49.html</a>
1.0.11	<a href="http://dev.mysql.com/doc/refman/5.1/en/news-5-1-50.html">http://dev.mysql.com/doc/refman/5.1/en/news-5-1-50.html</a>
1.0.12	<a href="http://dev.mysql.com/doc/refman/5.1/en/news-5-1-51.html">http://dev.mysql.com/doc/refman/5.1/en/news-5-1-51.html</a>
1.0.13	<a href="http://dev.mysql.com/doc/refman/5.1/en/news-5-1-52.html">http://dev.mysql.com/doc/refman/5.1/en/news-5-1-52.html</a>
	<a href="http://dev.mysql.com/doc/refman/5.1/en/news-5-1-53.html">http://dev.mysql.com/doc/refman/5.1/en/news-5-1-53.html</a>
1.0.14	<a href="http://dev.mysql.com/doc/refman/5.1/en/news-5-1-54.html">http://dev.mysql.com/doc/refman/5.1/en/news-5-1-54.html</a>
1.0.15	<a href="http://dev.mysql.com/doc/refman/5.1/en/news-5-1-55.html">http://dev.mysql.com/doc/refman/5.1/en/news-5-1-55.html</a>
	<a href="http://dev.mysql.com/doc/refman/5.1/en/news-5-1-56.html">http://dev.mysql.com/doc/refman/5.1/en/news-5-1-56.html</a>
1.0.16	<a href="http://dev.mysql.com/doc/refman/5.1/en/news-5-1-57.html">http://dev.mysql.com/doc/refman/5.1/en/news-5-1-57.html</a>
1.0.17	<a href="http://dev.mysql.com/doc/refman/5.1/en/news-5-1-58.html">http://dev.mysql.com/doc/refman/5.1/en/news-5-1-58.html</a>
	<a href="http://dev.mysql.com/doc/refman/5.1/en/news-5-1-59.html">http://dev.mysql.com/doc/refman/5.1/en/news-5-1-59.html</a>
	<a href="http://dev.mysql.com/doc/refman/5.1/en/news-5-1-60.html">http://dev.mysql.com/doc/refman/5.1/en/news-5-1-60.html</a></pre>
<p><strong>Plugin 1.1:</strong></p>
<pre>1.1.0	<a href="http://dev.mysql.com/doc/innodb/1.1/en/innodb-changes-11.html">http://dev.mysql.com/doc/innodb/1.1/en/innodb-changes-11.html</a>
1.1.1	<a href="http://dev.mysql.com/doc/refman/5.5/en/news-5-5-5.html">http://dev.mysql.com/doc/refman/5.5/en/news-5-5-5.html</a>
1.1.2	<a href="http://dev.mysql.com/doc/refman/5.5/en/news-5-5-6.html">http://dev.mysql.com/doc/refman/5.5/en/news-5-5-6.html</a>
1.1.3	<a href="http://dev.mysql.com/doc/refman/5.5/en/news-5-5-7.html">http://dev.mysql.com/doc/refman/5.5/en/news-5-5-7.html</a>
1.1.4	<a href="http://dev.mysql.com/doc/refman/5.5/en/news-5-5-8.html">http://dev.mysql.com/doc/refman/5.5/en/news-5-5-8.html</a>
1.1.5	<a href="http://dev.mysql.com/doc/refman/5.5/en/news-5-5-9.html">http://dev.mysql.com/doc/refman/5.5/en/news-5-5-9.html</a>
	<a href="http://dev.mysql.com/doc/refman/5.5/en/news-5-5-10.html">http://dev.mysql.com/doc/refman/5.5/en/news-5-5-10.html</a>
1.1.6	<a href="http://dev.mysql.com/doc/refman/5.5/en/news-5-5-11.html">http://dev.mysql.com/doc/refman/5.5/en/news-5-5-11.html</a>
	<a href="http://dev.mysql.com/doc/refman/5.5/en/news-5-5-12.html">http://dev.mysql.com/doc/refman/5.5/en/news-5-5-12.html</a>
1.1.7	<a href="http://dev.mysql.com/doc/refman/5.5/en/news-5-5-13.html">http://dev.mysql.com/doc/refman/5.5/en/news-5-5-13.html</a>
1.1.8	<a href="http://dev.mysql.com/doc/refman/5.5/en/news-5-5-14.html">http://dev.mysql.com/doc/refman/5.5/en/news-5-5-14.html</a>
	<a href="http://dev.mysql.com/doc/refman/5.5/en/news-5-5-15.html">http://dev.mysql.com/doc/refman/5.5/en/news-5-5-15.html</a>
	<a href="http://dev.mysql.com/doc/refman/5.5/en/news-5-5-16.html">http://dev.mysql.com/doc/refman/5.5/en/news-5-5-16.html</a>
	<a href="http://dev.mysql.com/doc/refman/5.5/en/news-5-5-17.html">http://dev.mysql.com/doc/refman/5.5/en/news-5-5-17.html</a>
	<a href="http://dev.mysql.com/doc/refman/5.5/en/news-5-5-18.html">http://dev.mysql.com/doc/refman/5.5/en/news-5-5-18.html</a></pre>
<p><strong>Misc. Notes:</strong></p>
<p>5.1.38 is first release of the plugin</p>
<p><a href="http://dev.mysql.com/doc/refman/5.1/en/news-5-1-38.html">http://dev.mysql.com/doc/refman/5.1/en/news-5-1-38.html</a></p>
<p>And for reference, here is the text from that announcement regarding the InnoDB Plugin:</p>
<pre>C.1.1. Changes in MySQL 5.1.38

  As of MySQL 5.1.38, the InnoDB Plugin is included in MySQL
  releases, in addition to the built-in version of InnoDB that
  has been included in previous releases. This version of the
  InnoDB Plugin is 1.0.4 and is considered of Beta quality.

  The InnoDB Plugin offers new features, improved performance
  and scalability, enhanced reliability and new capabilities
  for flexibility and ease of use. Among the features of the
  InnoDB Plugin are "Fast index creation," table and index
  compression, file format management, new INFORMATION_SCHEMA
  tables, capacity tuning, multiple background I/O threads, and
  group commit.

  For information about these features, see the InnoDB Plugin
  Manual at

http://www.innodb.com/products/innodb_plugin/plugin-documentation

  For general information about using InnoDB in MySQL,
  see Section 13.6, "The InnoDB Storage Engine."

  The InnoDB Plugin is included in source and binary
  distributions, except RHEL3, RHEL4, SuSE 9 (x86, x86_64,
  ia64), and generic Linux RPM packages.

  To use the InnoDB Plugin, you must disable the built-in
  version of InnoDB that is also included and instruct the
  server to use InnoDB Plugin instead. To accomplish this, use
  the following lines in your my.cnf file:

    [mysqld]
    ignore-builtin-innodb
    plugin-load=innodb=ha_innodb_plugin.so

  For the plugin-load option, innodb is the name to associate
  with the plugin and ha_innodb_plugin.so is the name of the
  shared object library that contains the plugin code. The
  extension of .so applies for Unix (and similar) systems. For
  HP-UX on HPPA (11.11) or Windows, the extension should be .sl
  or .dll, respectively, rather than .so.

  If the server has problems finding the plugin when it starts
  up, specify the pathname to the plugin directory. For
  example, if plugins are located in the lib/mysql/plugin
  directory under the MySQL installation directory and you have
  installed MySQL at /usr/local/mysql, use these lines in your
  my.cnf file:

    [mysqld]
    ignore-builtin-innodb
    plugin-load=innodb=ha_innodb_plugin.so
    plugin_dir=/usr/local/mysql/lib/mysql/plugin

  The previous examples show how to activate the storage engine
  part of InnoDB Plugin, but the plugin also implements several
  InnoDB-related INFORMATION_SCHEMA tables. (For information
  about these tables, see

http://www.innodb.com/doc/innodb_plugin-1.0/innodb-information-schema.html)

  To enable these tables, include additional name=library
  pairs to the plugin-load option:

    [mysqld]
    ignore-builtin-innodb
    plugin-load=innodb=ha_innodb_plugin.so
      ;innodb_trx=ha_innodb_plugin.so
      ;innodb_locks=ha_innodb_plugin.so
      ;innodb_cmp=ha_innodb_plugin.so
      ;innodb_cmp_reset=ha_innodb_plugin.so
      ;innodb_cmpmem=ha_innodb_plugin.so
      ;innodb_cmpmem_reset=ha_innodb_plugin.so

  The plugin-load option here is formatted on multiple lines
  for display purposes but should be written in my.cnf using a
  single line without spaces in the option value. On Windows,
  substitute .dll for each instance of the .so extension.

  After the server starts up, verify that InnoDB Plugin has
  been loaded by using the SHOW PLUGINS statement. For example,
  if you have loaded the storage engine and the
  INFORMATION_SCHEMA tables, the output should include lines
  similar to these:

    mysql&gt; SHOW PLUGINS;
    +---------------------+--------+--------------------+---------------------...
    | Name                | Status | Type               | Library             ...
    +---------------------+--------+--------------------+---------------------...
    | InnoDB              | ACTIVE | STORAGE ENGINE     | ha_innodb_plugin.so ...
    | INNODB_TRX          | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    | INNODB_LOCKS        | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    | INNODB_CMP          | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    | INNODB_CMP_RESET    | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    | INNODB_CMPMEM       | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    | INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    +---------------------+--------+--------------------+---------------------...

  If you build MySQL from a source distribution, InnoDB Plugin
  is one of the storage engines that is built by default. Build
  MySQL the way you normally do; for example, by using the
  instructions at Section 2.10, "MySQL Installation Using a
  Source Distribution." After the build completes, you should
  find the plugin shared object file under the
  storage/innodb_plugin directory, and make install should
  install it in the plugin directory. Configure MySQL to use
  InnoDB Plugin as described earlier for binary distributions.</pre>
<p><strong>Misc Links:</strong></p>
<p><a href="http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-plugin-introduction.html">http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-plugin-introduction.html</a><br />
<a href="http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes.html">http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-changes.html</a><br />
<a href="http://dev.mysql.com/doc/refman/5.5/en/innodb-5-5.html">http://dev.mysql.com/doc/refman/5.5/en/innodb-5-5.html</a><br />
<a href="http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-plugin-installation.html">http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-plugin-installation.html</a></p>
<p>转自:http://www.chriscalender.com/?p=479</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.c1gstudio.com/archives/1296/feed</wfw:commentRss>
		</item>
		<item>
		<title>内存问题服务器死机一例</title>
		<link>http://blog.c1gstudio.com/archives/1291</link>
		<comments>http://blog.c1gstudio.com/archives/1291#comments</comments>
		<pubDate>Wed, 30 Nov 2011 06:41:54 +0000</pubDate>
		<dc:creator>C1G</dc:creator>
		
		<category><![CDATA[技术]]></category>

		<category><![CDATA[内存]]></category>

		<category><![CDATA[死机]]></category>

		<guid isPermaLink="false">http://blog.c1gstudio.com/?p=1291</guid>
		<description><![CDATA[硬件:R410 E5606*2 4G*6 Hynix 4GB18-H9
系统:centos5.5 
服务器半天左右就会死机一次
tail /var/log/messages
Nov 25 09:28:20 c1g kernel: Machine check events logged
Nov 25 09:33:20 c1g kernel: Machine check events logged
Nov 25 09:38:20 c1g kernel: Machine check events logged
Nov 25 09:43:20 c1g kernel: Machine check events logged
Nov 25 09:48:20 c1g kernel: Machine check events logged
Nov 25 09:53:20 c1g kernel: Machine check events logged
Nov [...]]]></description>
			<content:encoded><![CDATA[<p>硬件:R410 E5606*2 4G*6 Hynix 4GB18-H9<br />
系统:centos5.5 </p>
<p>服务器半天左右就会死机一次<br />
tail /var/log/messages</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">Nov 25 09:28:20 c1g kernel: Machine check events logged</li>
<li>Nov 25 09:33:20 c1g kernel: Machine check events logged</li>
<li>Nov 25 09:38:20 c1g kernel: Machine check events logged</li>
<li>Nov 25 09:43:20 c1g kernel: Machine check events logged</li>
<li>Nov 25 09:48:20 c1g kernel: Machine check events logged</li>
<li>Nov 25 09:53:20 c1g kernel: Machine check events logged</li>
<li>Nov 25 10:03:20 c1g kernel: Machine check events logged</li>
<li>Nov 25 10:08:20 c1g kernel: Machine check events logged</li>
<li>Nov 25 10:13:20 c1g kernel: Machine check events logged</li>
<li>Nov 25 10:18:20 c1g kernel: Machine check events logged</li>
<li>Nov 25 10:23:20 c1g kernel: Machine check events logged</li>
<li>Nov 25 10:28:20 c1g kernel: Machine check events logged</li>
<li>Nov 25 10:44:46 c1g syslogd 1.4.1: restart.</li></ol></div>
<p>tail -n100 /var/log/mcelog</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">HARDWARE ERROR. This is *NOT* a software problem!</li>
<li>Please contact your hardware vendor</li>
<li>CPU 2 BANK 8 TSC 69cd4ba150c [at 2128 Mhz 0 days 0:56:56 uptime (unreliable)]</li>
<li>MISC c1ac44000081282 ADDR 5fa5c8580 </li>
<li>MCG status:</li>
<li>MCi status:</li>
<li>Error overflow</li>
<li>MCi_MISC register valid</li>
<li>MCi_ADDR register valid</li>
<li>MCA: MEMORY CONTROLLER RD_CHANNELunspecified_ERR</li>
<li>Transaction: Memory read error</li>
<li>STATUS cc0001800001009f MCGSTATUS 0</li>
<li>MCE 2</li>
<li>HARDWARE ERROR. This is *NOT* a software problem!</li>
<li>Please contact your hardware vendor</li>
<li>CPU 6 BANK 8 TSC 69cd4ba18ca [at 2128 Mhz 0 days 0:56:56 uptime (unreliable)]</li>
<li>MISC c1ac44000081282 ADDR 5fa5c8580 </li>
<li>MCG status:</li>
<li>MCi status:</li>
<li>Error overflow</li>
<li>MCi_MISC register valid</li>
<li>MCi_ADDR register valid</li>
<li>MCA: MEMORY CONTROLLER RD_CHANNELunspecified_ERR</li>
<li>Transaction: Memory read error</li>
<li>STATUS cc0001800001009f MCGSTATUS 0</li>
<li>MCE 3</li>
<li>HARDWARE ERROR. This is *NOT* a software problem!</li>
<li>Please contact your hardware vendor</li>
<li>CPU 4 BANK 8 TSC 69cd4ba1595 [at 2128 Mhz 0 days 0:56:56 uptime (unreliable)]</li>
<li>MISC c1ac44000081282 ADDR 5fa5c8580 </li>
<li>MCG status:</li>
<li>MCi status:</li>
<li>Error overflow</li>
<li>MCi_MISC register valid</li>
<li>MCi_ADDR register valid</li>
<li>MCA: MEMORY CONTROLLER RD_CHANNELunspecified_ERR</li>
<li>Transaction: Memory read error</li>
<li>STATUS cc0001800001009f MCGSTATUS 0</li></ol></div>
<p>日志中记录了内存出错,原来有24G内存拔掉了一根4G后问题没有再出现.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.c1gstudio.com/archives/1291/feed</wfw:commentRss>
		</item>
		<item>
		<title>Lempelf一键包 更新到1.0.1</title>
		<link>http://blog.c1gstudio.com/archives/1288</link>
		<comments>http://blog.c1gstudio.com/archives/1288#comments</comments>
		<pubDate>Wed, 30 Nov 2011 05:49:36 +0000</pubDate>
		<dc:creator>C1G</dc:creator>
		
		<category><![CDATA[技术]]></category>

		<category><![CDATA[lempelf]]></category>

		<guid isPermaLink="false">http://blog.c1gstudio.com/?p=1288</guid>
		<description><![CDATA[做了点小小更新
ChangeLog
--------------------------------------------------------------------------------
2011-11-30 发布Lempelf 1.0.1
支持32位ZendOptimizer
增加操作用户输入密码提示
增加可以自定义ssh端口
增加centos6的yum支持
增加内核shmmax优化修正eaccelerator.shm_size错误
修正php的cgi.fix_pathinfo参数
修改net.ipv4.tcp_max_tw_buckets = 15000
nginx更新到0.8.55
不关闭messagebus服务
yum 增加perl-ExtUtils-MakeMaker
安装mysql时自动删除 /etc/my.cnf
toolkits下增加采集系统信息脚本
http://blog.c1gstudio.com/lempelfpage
]]></description>
			<content:encoded><![CDATA[<p>做了点小小更新</p>
<p>ChangeLog<br />
--------------------------------------------------------------------------------<br />
2011-11-30 发布Lempelf 1.0.1<br />
支持32位ZendOptimizer<br />
增加操作用户输入密码提示<br />
增加可以自定义ssh端口<br />
增加centos6的yum支持<br />
增加内核shmmax优化修正eaccelerator.shm_size错误<br />
修正php的cgi.fix_pathinfo参数<br />
修改net.ipv4.tcp_max_tw_buckets = 15000<br />
nginx更新到0.8.55<br />
不关闭messagebus服务<br />
yum 增加perl-ExtUtils-MakeMaker<br />
安装mysql时自动删除 /etc/my.cnf<br />
toolkits下增加采集系统信息脚本</p>
<p><a href="http://blog.c1gstudio.com/lempelfpage">http://blog.c1gstudio.com/lempelfpage</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.c1gstudio.com/archives/1288/feed</wfw:commentRss>
		</item>
		<item>
		<title>用varnish来加速图片服务器</title>
		<link>http://blog.c1gstudio.com/archives/1272</link>
		<comments>http://blog.c1gstudio.com/archives/1272#comments</comments>
		<pubDate>Wed, 02 Nov 2011 09:57:20 +0000</pubDate>
		<dc:creator>C1G</dc:creator>
		
		<category><![CDATA[Squid/varnish]]></category>

		<category><![CDATA[cache]]></category>

		<category><![CDATA[varnish]]></category>

		<guid isPermaLink="false">http://blog.c1gstudio.com/?p=1272</guid>
		<description><![CDATA[varnish是和squid类似的高性能开源HTTP加速器,我这里用来缓存图片,js,css等小文件
varnish cache 192.168.0.15 centos6.0
nagios www后端 192.168.0.11  centos5.3
1.安装varnish
wget http://repo.varnish-cache.org/source/varnish-3.0.0.tar.gz
tar zxvf varnish-3.0.0.tar.gz 
cd varnish-3.0.0
./configure --prefix=/opt/varnish-3.0.0
make
make install
ln -s /opt/varnish-3.0.0 /opt/varnish
2.设置权限
cd /opt/varnish
#varnish以www:website来运行
chown -R www:website /opt/varnish/var/varnish/
mkdir /var/log/varnish
chown -R www:website /var/log/varnish
chown -R www:website /opt/varnish/var/varnish/`hostname`
mkdir /opt/varnish/var/varnish/`hostname`
3.配置文件
#查看默认配置文件
cat etc/varnish/default.vcl
#编辑新配置文件
vi etc/vcl.conf
#http请求处理过程
#1,receive请求入口状态，根据vcl判断pass还是lookup本地查询
#lookup，在hash表中查找数据，若找到则进入hit状态，否则进入fetch状态
#pass，选择后台，进入fetch状态
#fetch，对请求进行后端的获取，发送请求，获得数据，并进行本地存储
#deliver，将数据发送给客户端，进入done
#done,处理结束
backend wwwserver { 
&#160;&#160; &#160; &#160; .host = &#34;192.168.0.11&#34;; 
&#160;&#160; &#160; &#160; .port = &#34;80&#34;; 
}
backend staticserver {
&#160; .host = &#34;192.168.0.11&#34;;
&#160; .port = &#34;80&#34;;
}
acl [...]]]></description>
			<content:encoded><![CDATA[<p>varnish是和squid类似的高性能开源HTTP加速器,我这里用来缓存图片,js,css等小文件</p>
<p>varnish cache 192.168.0.15 centos6.0<br />
nagios www后端 192.168.0.11  centos5.3</p>
<p><strong>1.安装varnish</strong></p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">wget http://repo.varnish-cache.org/source/varnish-3.0.0.tar.gz</li>
<li>tar zxvf varnish-3.0.0.tar.gz </li>
<li>cd varnish-3.0.0</li>
<li>./configure --prefix=/opt/varnish-3.0.0</li>
<li>make</li>
<li>make install</li>
<li>ln -s /opt/varnish-3.0.0 /opt/varnish</li></ol></div>
<p><strong>2.设置权限</strong></p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">cd /opt/varnish</li>
<li>#varnish以www:website来运行</li>
<li>chown -R www:website /opt/varnish/var/varnish/</li>
<li>mkdir /var/log/varnish</li>
<li>chown -R www:website /var/log/varnish</li>
<li>chown -R www:website /opt/varnish/var/varnish/`hostname`</li>
<li>mkdir /opt/varnish/var/varnish/`hostname`</li></ol></div>
<p><strong>3.配置文件</strong></p>
<p>#查看默认配置文件<br />
cat etc/varnish/default.vcl</p>
<p>#编辑新配置文件<br />
vi etc/vcl.conf</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">#http请求处理过程</li>
<li>#1,receive请求入口状态，根据vcl判断pass还是lookup本地查询</li>
<li>#lookup，在hash表中查找数据，若找到则进入hit状态，否则进入fetch状态</li>
<li>#pass，选择后台，进入fetch状态</li>
<li>#fetch，对请求进行后端的获取，发送请求，获得数据，并进行本地存储</li>
<li>#deliver，将数据发送给客户端，进入done</li>
<li>#done,处理结束</li>
<li>backend wwwserver { </li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; .host = &quot;192.168.0.11&quot;; </li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; .port = &quot;80&quot;; </li>
<li>}</li>
<li>backend staticserver {</li>
<li>&nbsp; .host = &quot;192.168.0.11&quot;;</li>
<li>&nbsp; .port = &quot;80&quot;;</li>
<li>}</li>
<li>acl purge {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &quot;localhost&quot;;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &quot;127.0.0.1&quot;;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &quot;192.168.1.0&quot;/24;</li>
<li>}</li>
<li>&nbsp;</li>
<li>sub vcl_recv {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; if (req.request == &quot;PURGE&quot;) {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!client.ip ~ purge) {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; error 405 &quot;Not allowed.&quot;;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return(lookup);</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; }</li>
<li>	#去除cookie</li>
<li>	if (req.request == &quot;GET&quot; &amp;&amp; req.url ~ &quot;^/[^?]+\.(jpeg|jpg|png|gif|ico|swf|js|css|txt|zip|html|htm)(\?.*|)$&quot;) {</li>
<li>		unset req.http.Cookie;</li>
<li>	}</li>
<li>	#判断req.http.X-Forwarded-For 如果前端有多重反向代理，这样可以获取客户端IP地址。</li>
<li>	if (req.http.x-forwarded-for)</li>
<li>	{</li>
<li>		set req.http.X-Forwarded-For = req.http.X-Forwarded-For + &quot;, &quot;+ client.ip;</li>
<li>	}</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;else { </li>
<li>		set req.http.X-Forwarded-For = client.ip; </li>
<li>	}</li>
<li>&nbsp;</li>
<li>	#浏览器Accept-Encoding兼容</li>
<li>	if (req.http.Accept-Encoding) {</li>
<li>		if (req.url ~ &quot;\.(jpg|png|gif|jpeg)$&quot;) {</li>
<li>		&nbsp; &nbsp; remove req.http.Accept-Encoding;</li>
<li>		} elsif (req.http.Accept-Encoding ~ &quot;gzip&quot;) {</li>
<li>		&nbsp; &nbsp; set req.http.Accept-Encoding = &quot;gzip&quot;;</li>
<li>		} elsif (req.http.Accept-Encoding ~ &quot;deflate&quot;) {</li>
<li>		&nbsp; &nbsp; set req.http.Accept-Encoding = &quot;deflate&quot;;</li>
<li>		} else {</li>
<li>		&nbsp; &nbsp; remove req.http.Accept-Encoding;</li>
<li>		}</li>
<li>	}</li>
<li>&nbsp;</li>
<li>	if (req.http.host ~ &quot;^blog.c1gstudio.com&quot;) {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set req.backend = wwwserver; </li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (req.request != &quot;GET&quot; &amp;&amp; req.request != &quot;HEAD&quot;) {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return(pipe);</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</li>
<li>	&nbsp; &nbsp; &nbsp; &nbsp;elseif(req.url ~ &quot;\.(php|cgi)($|\?)&quot;) {</li>
<li>			return(pass);</li>
<li>		}</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else {</li>
<li>&nbsp;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return(lookup);</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; } elsif (req.http.host ~ &quot;^static.c1gstudio.net&quot;) {</li>
<li>		#第二个域名</li>
<li>		set req.backend = staticserver;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; }else {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; error 404 &quot;Cache Server&quot;; </li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return(lookup);</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; }</li>
<li>}</li>
<li>&nbsp;</li>
<li>sub vcl_hit {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; if (req.request == &quot;PURGE&quot;) {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set obj.ttl = 0s;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; error 200 &quot;Purged.&quot;;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; }</li>
<li>}</li>
<li>&nbsp;</li>
<li>sub vcl_miss {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; if (req.request == &quot;PURGE&quot;) {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; error 404 &quot;Not in cache.&quot;;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; }</li>
<li>}</li>
<li>&nbsp;</li>
<li>sub vcl_fetch {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; if (req.request == &quot;GET&quot; &amp;&amp; req.url ~ &quot;\.(jpeg|jpg|png|gif|ico|swf|js|css|txt|zip)$&quot;) {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set beresp.ttl = 600s;</li>
<li>		unset beresp.http.set-cookie;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; }</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; else {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set beresp.ttl = 3600s;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; }</li>
<li>}</li>
<li>#显示是否命中</li>
<li>sub vcl_deliver{</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if (obj.hits &gt; 0) {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;set resp.http.X-Cache = &quot;Server-1-HIT&quot;;</li>
<li>		set resp.http.X-Cache-Hits = obj.hits;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;} else {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;set resp.http.X-Cache = &quot;Server-1-MISS&quot;;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</li>
<li>	unset resp.http.X-Varnish;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;set resp.http.Via = &quot;1.1 Xcache&quot;;</li>
<li>}</li></ol></div>
<p><strong>4.启动varnish</strong></p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">/opt/varnish/sbin/varnishd -n /opt/varnish/var/varnish -f /opt/varnish/etc/vcl.conf -a 0.0.0.0:80 -s malloc,1G -g website -u www&nbsp; -T 127.0.0.1:3200 -p sess_workspace=64768 -p thread_pools=2 -p listen_depth=4096 -p first_byte_timeout=10 -p sess_timeout=15 -w 200,5000,10</li></ol></div>
<p>#参数说明</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">-n vcache /&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #临时文件实例名.如果以&quot;/&quot;开头,就必须是一个可用的路径.</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;-a :80 /&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#服务所在端口.&quot;:80&quot;是默认所有网络都建立80端口,&quot;:&quot;前面是服务器IP.</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;-T :5000 /&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #管理端口. </li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;-s file,/data1/vcache,80g /&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #虚拟内存文件映射类型,路径以及容量. 包括两种类型&quot;malloc&quot;和&quot;file&quot;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;-s file,/data2/vcache,80g /&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #malloc是内存+swap交换模式.很简单.没得说.</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;-s file,/data3/vcache,80g /&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #file是mmap的文件内存映射机制.(具体情况,参阅&quot;mmap&quot;函数说明)</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;-s file,/data4/vcache,80g /</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;-f /usr/local/varnish/etc/varnish.vcl /&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#VCL文件路径.</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;-P /var/run/varnish.pid /&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #PID文件地址.</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;-w 200,5000,10 /&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#工作进程数.三个参数分别是:&lt;min=5&gt;,&lt;max=500&gt;,&lt;timeout=300&gt;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;-h classic,16383 /&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #hash列表类型,以及长度.默认长度是16383.具体用处和调整实际效果要等我看完源代码才知道.</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;-p user=www /&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #&quot;-p&quot;是变量配置参数</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;-p group=website/&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #服务运行用户和用户组配置.</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;-p thread_pools=4 /&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #进程connections pools的个数,数量越多,越耗用cpu和mem,但是处理并发能力越强.</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #系统手册上说,一个cpu用一个.</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;-p listen_depth=4096 /&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #TCP队列长度.默认是1024. </li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;-p first_byte_timeout=10&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#从后端接受第一个字节的超时时间。默认60秒</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;-p between_bytes_timeout=60&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #从后端接收数据后,连接空闲时间,默认60秒</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;-p sess_timeout=15&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #客户端和varnish连接超时时间,默认5秒</li></ol></div>
<p><strong>5.记录日志</strong><br />
/opt/varnish/bin/varnishncsa -n /opt/varnish/var/varnish -w /var/log/varnish/varnish.log &#038;</p>
<p>#定时切割日志<br />
vi /opt/shell/cutvarnishlog.sh</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">#!/bin/sh</li>
<li># 0 0 * * * /bin/sh /opt/shell/cutvarnishlog.sh&nbsp; &gt; /dev/null 2&gt;&amp;1</li>
<li>date=$(date -d &quot;yesterday&quot; +&quot;%Y%m%d&quot;)</li>
<li>pkill -9 varnishncsa</li>
<li>mv /var/log/varnish/varnish.log /var/log/varnish/varnish.${date}.log</li>
<li>/opt/varnish/bin/varnishncsa -n /opt/varnish/var/varnish -w /var/log/varnish/varnish.log &amp;</li>
<li>mkdir -p /var/log/varnish/old</li>
<li>gzip -c /var/log/varnish/varnish.${date}.log &gt; /var/log/varnish/old/varnish.${date}.log.gz</li>
<li>rm -f /var/log/varnish/varnish.${date}.log</li>
<li>rm -f /var/log/varnish/old/varnish$(date -d &quot;-1 month&quot; +&quot;%Y%m*&quot;).log.gz</li></ol></div>
<p>crontab -e</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">0 0 * * * /bin/sh /opt/shell/cutvarnishlog.sh&nbsp; &gt; /dev/null 2&gt;&amp;1</li></ol></div>
<p><strong>6.查看运行统计</strong><br />
/opt/varnish/bin/varnishstat -n /opt/varnish/var/varnish</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">1+01:13:37&nbsp; &nbsp; &nbsp; &nbsp;/opt/varnish/var/varnish</li>
<li>Hitrate ratio:&nbsp; &nbsp; &nbsp; &nbsp;10&nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 288</li>
<li>Hitrate avg:&nbsp; &nbsp; &nbsp;0.9987&nbsp; &nbsp;0.9981&nbsp; &nbsp;0.9978</li>
<li>&nbsp;</li>
<li>&nbsp;&nbsp; &nbsp;22251295&nbsp; &nbsp; &nbsp; &nbsp;371.40&nbsp; &nbsp; &nbsp; &nbsp;245.01 client_conn - Client connections accepted</li>
<li>&nbsp;&nbsp; &nbsp;22250487&nbsp; &nbsp; &nbsp; &nbsp;371.40&nbsp; &nbsp; &nbsp; &nbsp;245.00 client_req - Client requests received</li>
<li>&nbsp;&nbsp; &nbsp;22185321&nbsp; &nbsp; &nbsp; &nbsp;371.40&nbsp; &nbsp; &nbsp; &nbsp;244.29 cache_hit - Cache hits</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; 62904&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.69 cache_miss - Cache misses</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;4615&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.05 backend_conn - Backend conn. success</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;22&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00 backend_fail - Backend conn. failures</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; 59164&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.65 backend_reuse - Backend conn. reuses</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; 456&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.01 backend_toolate - Backend conn. was closed</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; 59622&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.66 backend_recycle - Backend conn. recycles</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; 47470&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.52 fetch_length - Fetch with Length</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; 16307&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.18 fetch_chunked - Fetch chunked</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00 fetch_close - Fetch wanted close</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;1873&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp;n_sess_mem - N struct sess_mem</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;1834&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp;n_sess - N struct sess</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; 655&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp;n_object - N struct object</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; 685&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp;n_objectcore - N struct objectcore</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; 784&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp;n_objecthead - N struct objecthead</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; 405&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp;n_waitinglist - N struct waitinglist</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp;n_vbc - N struct vbc</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;31&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp;n_wrk - N worker threads</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; 381&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00 n_wrk_create - N worker threads created</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;2584&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.03 n_wrk_queued - N queued work requests</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp;n_backend - N backends</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; 62227&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp;n_expired - N expired objects</li>
<li>&nbsp;&nbsp; &nbsp; 5365503&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .&nbsp; &nbsp;n_lru_moved - N LRU moved objects</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;1362&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.01 losthdr - HTTP header overflows</li>
<li>&nbsp;&nbsp; &nbsp;18551363&nbsp; &nbsp; &nbsp; &nbsp;326.47&nbsp; &nbsp; &nbsp; &nbsp;204.27 n_objwrite - Objects sent with write</li>
<li>&nbsp;&nbsp; &nbsp;22251295&nbsp; &nbsp; &nbsp; &nbsp;371.40&nbsp; &nbsp; &nbsp; &nbsp;245.01 s_sess - Total Sessions</li>
<li>&nbsp;&nbsp; &nbsp;22250487&nbsp; &nbsp; &nbsp; &nbsp;371.40&nbsp; &nbsp; &nbsp; &nbsp;245.00 s_req - Total Requests</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; 898&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.01 s_pass - Total pass</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; 63779&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.70 s_fetch - Total fetch</li>
<li>&nbsp; 7539848276&nbsp; &nbsp; 127352.96&nbsp; &nbsp; &nbsp;83022.43 s_hdrbytes - Total header bytes&nbsp; </li>
<li>141933911830&nbsp; &nbsp;2248780.45&nbsp; &nbsp;1562856.20 s_bodybytes - Total body bytes&nbsp; &nbsp;</li>
<li>&nbsp;&nbsp; &nbsp;22251292&nbsp; &nbsp; &nbsp; &nbsp;371.40&nbsp; &nbsp; &nbsp; &nbsp;245.01 sess_closed - Session Closed</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00 sess_herd - Session herd</li>
<li>&nbsp;&nbsp; 998035729&nbsp; &nbsp; &nbsp;16610.26&nbsp; &nbsp; &nbsp;10989.53 shm_records - SHM records </li>
<li>&nbsp;&nbsp; &nbsp;89193699&nbsp; &nbsp; &nbsp; 1488.60&nbsp; &nbsp; &nbsp; &nbsp;982.13 shm_writes - SHM writes</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp;328009&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;8.99&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3.61 shm_cont - SHM MTX contention</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; 385&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00 shm_cycles - SHM cycles through buffer</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;1387&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.00&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.02 sms_nreq - SMS allocator requests</li></ol></div>
<p><strong>7.管理清除缓存</strong><br />
<strong>7.1通过Varnish管理端口进行管理</strong><br />
/opt/varnish/bin/varnishadm -T 127.0.0.1:3200 help</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">CLI connected to 127.0.0.1:3200</li>
<li>help [command]</li>
<li>ping [timestamp]</li>
<li>auth response</li>
<li>quit</li>
<li>banner</li>
<li>status</li>
<li>start</li>
<li>stop</li>
<li>vcl.load &lt;configname&gt; &lt;filename&gt;</li>
<li>vcl.inline &lt;configname&gt; &lt;quoted_VCLstring&gt;</li>
<li>vcl.use &lt;configname&gt;</li>
<li>vcl.discard &lt;configname&gt;</li>
<li>vcl.list</li>
<li>vcl.show &lt;configname&gt;</li>
<li>param.show [-l] [&lt;param&gt;]</li>
<li>param.set &lt;param&gt; &lt;value&gt;</li>
<li>panic.show</li>
<li>panic.clear</li>
<li>storage.list</li>
<li>ban.url &lt;regexp&gt;</li>
<li>ban &lt;field&gt; &lt;operator&gt; &lt;arg&gt; [&amp;&amp; &lt;field&gt; &lt;oper&gt; &lt;arg&gt;]...</li>
<li>ban.list</li></ol></div>
<p>通过Varnish管理端口清除缓存,支持正则表达式,1.0时为url.purge参数：<br />
/opt/varnish/bin/varnishadm -T 127.0.0.1:3200 ban.url /shanghai-4.html</p>
<p>例：清除所有缓存：<br />
/opt/varnish/bin/varnishadm -T 127.0.0.1:3200 ban.url *$</p>
<p><strong>7.2通过telnet方式清除</strong></p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">telnet 127.0.0.1 3200</li>
<li>Trying 127.0.0.1 ...</li>
<li>Connected to 127.0.0.1.</li>
<li>Escape character is '^]'.</li>
<li>200 205&nbsp; &nbsp; &nbsp;</li>
<li>-----------------------------</li>
<li>Varnish Cache CLI 1.0</li>
<li>-----------------------------</li>
<li>Linux,2.6.32-71.el6.i686,i686,-smalloc,-smalloc,-hcritbit</li>
<li>&nbsp;</li>
<li>Type 'help' for command list.</li>
<li>Type 'quit' to close CLI session.</li>
<li>&nbsp;</li>
<li>help</li>
<li>200 401&nbsp; &nbsp; &nbsp;</li>
<li>help [command]</li>
<li>ping [timestamp]</li>
<li>auth response</li>
<li>quit</li>
<li>banner</li>
<li>status</li>
<li>start</li>
<li>stop</li>
<li>vcl.load &lt;configname&gt; &lt;filename&gt;</li>
<li>vcl.inline &lt;configname&gt; &lt;quoted_VCLstring&gt;</li>
<li>vcl.use &lt;configname&gt;</li>
<li>vcl.discard &lt;configname&gt;</li>
<li>vcl.list</li>
<li>vcl.show &lt;configname&gt;</li>
<li>param.show [-l] [&lt;param&gt;]</li>
<li>param.set &lt;param&gt; &lt;value&gt;</li>
<li>panic.show</li>
<li>panic.clear</li>
<li>storage.list</li>
<li>ban.url &lt;regexp&gt;</li>
<li>ban &lt;field&gt; &lt;operator&gt; &lt;arg&gt; [&amp;&amp; &lt;field&gt; &lt;oper&gt; &lt;arg&gt;]...</li>
<li>ban.list</li>
<li>&nbsp;</li>
<li>#1.0时的方法现在不支持</li>
<li>purge.url /shanghai-4.html</li>
<li>200 0 101 44&nbsp; &nbsp; &nbsp; </li>
<li>Unknown request.</li>
<li>Type 'help' for more info.</li>
<li>&nbsp;</li>
<li>#正确方法</li>
<li>ban.url /shanghai-4.html</li>
<li>200 0</li></ol></div>
<p><strong>7.3通过php等其它web请求清除缓存</strong></p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Green;">function</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">purge</span><span style="color: Olive;">(</span><span style="color: #00008b;">$ip</span><span style="color: Gray;">,</span><span style="color: #00008b;">$port</span><span style="color: Gray;">=</span><span style="color: Maroon;">80</span><span style="color: Gray;">,</span><span style="color: #00008b;">$domain</span><span style="color: Gray;">, </span><span style="color: #00008b;">$url</span><span style="color: Olive;">)</span><span style="color: Gray;">&nbsp; </span></li>
<li><span style="color: Olive;">{</span><span style="color: Gray;">&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: #00008b;">$errstr</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">''</span><span style="color: Gray;">;&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: #00008b;">$errno</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">''</span><span style="color: Gray;">;&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: #00008b;">$fp</span><span style="color: Gray;"> = </span><span style="color: Blue;">fsockopen</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: #00008b;">$ip</span><span style="color: Gray;">, </span><span style="color: #00008b;">$port</span><span style="color: Gray;">, </span><span style="color: #00008b;">$errno</span><span style="color: Gray;">, </span><span style="color: #00008b;">$errstr</span><span style="color: Gray;">, </span><span style="color: Maroon;">2</span><span style="color: Olive;">)</span><span style="color: Gray;">;&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: Gray;">!</span><span style="color: #00008b;">$fp</span><span style="color: Olive;">)</span><span style="color: Gray;">&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">{</span><span style="color: Gray;">&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; </span><span style="color: Green;">return</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">false</span><span style="color: Gray;">;&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">}</span><span style="color: Gray;">&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">else</span><span style="color: Gray;">&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">{</span><span style="color: Gray;">&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$out</span><span style="color: Gray;"> = </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">PURGE </span><span style="color: #00008b;">$url</span><span style="color: Red;"> HTTP/1.1</span><span style="color: Navy;">\r\n</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">;&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$out</span><span style="color: Gray;"> .= </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">Host:</span><span style="color: #00008b;">$domain</span><span style="color: Navy;">\r\n</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">;&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$out</span><span style="color: Gray;"> .= </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">Connection: close</span><span style="color: Navy;">\r\n\r\n</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">;&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Blue;">fputs</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: #00008b;">$fp</span><span style="color: Gray;">, </span><span style="color: #00008b;">$out</span><span style="color: Olive;">)</span><span style="color: Gray;">;&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #00008b;">$out</span><span style="color: Gray;"> = </span><span style="color: Blue;">fgets</span><span style="color: Olive;">(</span><span style="color: #00008b;">$fp</span><span style="color: Gray;"> , </span><span style="color: Maroon;">4096</span><span style="color: Olive;">)</span><span style="color: Gray;">;&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Blue;">fclose</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">(</span><span style="color: #00008b;">$fp</span><span style="color: Olive;">)</span><span style="color: Gray;">;&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">return</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">true</span><span style="color: Gray;">;&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">}</span><span style="color: Gray;">&nbsp; </span></li>
<li><span style="color: Olive;">}</span><span style="color: Gray;">&nbsp; </span></li>
<li><span style="color: Blue;">purge</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">192.168.0.15</span><span style="color: #8b0000;">'</span><span style="color: Gray;">,</span><span style="color: #8b0000;">'</span><span style="color: Red;">80</span><span style="color: #8b0000;">'</span><span style="color: Gray;">,</span><span style="color: #8b0000;">'</span><span style="color: Red;">blog.c1gstudio.com</span><span style="color: #8b0000;">'</span><span style="color: Gray;">,</span><span style="color: #8b0000;">'</span><span style="color: Red;">/shanghai-4.html</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
</ol></div>
<p><strong>8.varnish的nginx前端</strong><br />
测试下来nginx和varnish在同一机器上会产生大量time_wait,单独使用没有问题.</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">upstream mysvr {</li>
<li>	server 127.0.0.1:82;</li>
<li>&nbsp;&nbsp; &nbsp; }</li>
<li>&nbsp;</li>
<li>&nbsp;&nbsp; &nbsp; server</li>
<li>&nbsp;&nbsp; &nbsp; {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; listen&nbsp; &nbsp; &nbsp; &nbsp;80;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; server_name&nbsp; static.c1gstudio.net;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; index index.html index.htm index.php;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; root&nbsp; /opt/lampp/htdocs/web;</li>
<li>&nbsp;</li>
<li>&nbsp;	&nbsp; &nbsp; &nbsp;location ~/\.ht {</li>
<li>	&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;deny all;</li>
<li>	&nbsp; &nbsp; &nbsp;}</li>
<li>&nbsp;	&nbsp; &nbsp; &nbsp;location ~(favicon.ico) {</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log_not_found off;</li>
<li>		 expires 99d;</li>
<li>		 break;</li>
<li>	&nbsp; &nbsp; &nbsp;}</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; location ~ .*\.(php|html|htm)?$</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</li>
<li>			return 403;		&nbsp; &nbsp; &nbsp;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</li>
<li>&nbsp;</li>
<li>	&nbsp; &nbsp; &nbsp;location / {</li>
<li>		valid_referers none blocked *.c1gstudio.com *.c1gstudio.net ;</li>
<li>		if ($invalid_referer) {</li>
<li>		&nbsp; &nbsp; rewrite ^/ http://leech.c1gstudio.com/leech.gif;</li>
<li>		&nbsp; &nbsp; return 412;</li>
<li>		&nbsp; &nbsp; break;</li>
<li>		}</li>
<li>&nbsp;</li>
<li>		&nbsp; proxy_pass http://mysvr;</li>
<li>		&nbsp; proxy_set_header&nbsp; &nbsp;Host&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$host;</li>
<li>		&nbsp; proxy_set_header&nbsp; &nbsp;X-Real-IP&nbsp; &nbsp; &nbsp; &nbsp; $remote_addr;</li>
<li>		&nbsp; proxy_set_header&nbsp; &nbsp;X-Forwarded-For&nbsp; $proxy_add_x_forwarded_for;</li>
<li>	&nbsp; &nbsp; &nbsp;}&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </li>
<li>&nbsp;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; access_log&nbsp; /var/log/nginx/static.c1gstudio.net.log&nbsp; access;</li>
<li>&nbsp;&nbsp; &nbsp; }</li></ol></div>
<p><strong>9.内核优化</strong><br />
vi /etc/sysctl.conf</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">net.ipv4.tcp_fin_timeout = 30</li>
<li>net.ipv4.tcp_keepalive_time = 300</li>
<li>net.ipv4.tcp_syncookies = 1</li>
<li>net.ipv4.tcp_tw_reuse = 1</li>
<li>net.ipv4.tcp_tw_recycle = 1</li>
<li>net.ipv4.ip_local_port_range = 5000&nbsp; &nbsp; 65000</li></ol></div>
<p>sysctl -p</p>
<p>varnish服务器运行基本没有负载</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">top - 15:54:34 up 34 days, 23:49,&nbsp; 1 user,&nbsp; load average: 0.00, 0.01, 0.00 </li>
<li>Tasks: 125 total,&nbsp; &nbsp;1 running, 124 sleeping,&nbsp; &nbsp;0 stopped,&nbsp; &nbsp;0 zombie </li>
<li>Cpu(s):&nbsp; 1.8%us,&nbsp; 1.3%sy,&nbsp; 0.0%ni, 95.0%id,&nbsp; 0.4%wa,&nbsp; 0.0%hi,&nbsp; 1.5%si,&nbsp; 0.0%st </li>
<li>Mem:&nbsp; &nbsp;2070548k total,&nbsp; 2017996k used,&nbsp; &nbsp; 52552k free,&nbsp; &nbsp; 83556k buffers </li>
<li>Swap:&nbsp; 2097144k total,&nbsp; &nbsp; &nbsp; &nbsp; 0k used,&nbsp; 2097144k free,&nbsp; 1612756k cached </li>
<li>&nbsp;</li>
<li>&nbsp; PID USER&nbsp; &nbsp; &nbsp; PR&nbsp; NI&nbsp; VIRT&nbsp; RES&nbsp; SHR S %CPU %MEM&nbsp; &nbsp; TIME+&nbsp; COMMAND&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</li>
<li>26631 www&nbsp; &nbsp; &nbsp; &nbsp;20&nbsp; &nbsp;0&nbsp; 228m 134m&nbsp; 81m S&nbsp; 7.6&nbsp; 6.7&nbsp; 74:46.86 varnishd&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</li>
<li>&nbsp;6070 www&nbsp; &nbsp; &nbsp; &nbsp;20&nbsp; &nbsp;0 31852&nbsp; 25m 1000 S&nbsp; 3.3&nbsp; 1.3&nbsp; &nbsp;7:28.79 nginx&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </li>
<li>&nbsp;6071 www&nbsp; &nbsp; &nbsp; &nbsp;20&nbsp; &nbsp;0 31076&nbsp; 24m 1000 S&nbsp; 2.0&nbsp; 1.2&nbsp; &nbsp;7:22.34 nginx&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </li>
<li>&nbsp;6068 www&nbsp; &nbsp; &nbsp; &nbsp;20&nbsp; &nbsp;0 31356&nbsp; 25m&nbsp; 976 S&nbsp; 1.7&nbsp; 1.3&nbsp; &nbsp;7:21.36 nginx</li></ol></div>
<p>tcp状态<br />
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">LAST_ACK 9</li>
<li>SYN_RECV 5</li>
<li>CLOSE_WAIT 3</li>
<li>ESTABLISHED 2083</li>
<li>FIN_WAIT1 95</li>
<li>FIN_WAIT2 247</li>
<li>TIME_WAIT 14412</li></ol></div>
<p>2011-11-17更新<br />
2011-11-15更新</p>
<p>参考:<br />
Varnish-2.1.2 安装与配置.pdf<br />
varnish浅析.pdf<br />
varnish文件缓存实现2008-11-22.pdf<br />
<a href='http://blog.c1gstudio.com/wp-content/uploads/2011/11/varnishdocs.rar'>三个文件包下载varnishdocs 736k</a></p>
<p>http://blog.s135.com/post/313/<br />
http://eneplace.com/2011/01/varnish-cookies-querystrings.html<br />
https://www.varnish-cache.org/docs/3.0/reference/vcl.html#variables</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.c1gstudio.com/archives/1272/feed</wfw:commentRss>
		</item>
		<item>
		<title>流氓电信DNS劫持强插广告</title>
		<link>http://blog.c1gstudio.com/archives/1265</link>
		<comments>http://blog.c1gstudio.com/archives/1265#comments</comments>
		<pubDate>Tue, 18 Oct 2011 03:56:34 +0000</pubDate>
		<dc:creator>C1G</dc:creator>
		
		<category><![CDATA[安全]]></category>

		<category><![CDATA[dns]]></category>

		<category><![CDATA[挂马]]></category>

		<guid isPermaLink="false">http://blog.c1gstudio.com/?p=1265</guid>
		<description><![CDATA[&#60;html&#62;&#60;head&#62;&#60;title&#62;论坛 BBS 论坛 -&#60;/title&#62;&#60;style type=&#34;text/css&#34;&#62;body {margin: 0px;padding: 0px;overflow:hidden;}&#60;/style&#62;&#60;/head&#62;&#60;body&#62;&#60;iframe height=&#34;100%&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; marginwidth=&#34;0&#34; marginheight=&#34;0&#34; src=&#34;&#34; name=&#34;fulliframe&#34; id=&#34;fulliframe&#34;&#62;&#60;/iframe&#62;&#60;script type=&#34;text/javascript&#34; language=&#34;javascript&#34;&#62;frames[0].location=window.location;function c(){try{var f=frames[0];var d=f.document;(function(s){})(d.readyState);if(d&#38;amp;&#38;amp;('complete'==d.readyState)){document.title=d.title?d.title:'';}else{setTimeout('c()',10);}}catch(ex){try{document.domain=document.domain.replace(/^\w+\./,'');c();}catch(ex){}}};c();&#60;/script&#62;&#60;script type=&#34;text/javascript&#34; language=&#34;javascript&#34; src=&#34;http://61.172.192.71/pagead/ads.js?umask=90&#38;amp;interval=0&#38;amp;vask=3214807291&#38;amp;uid=2800005159&#38;amp;pid=72057931677349889&#38;amp;o_url=bbs.c1gstudio.com/&#38;amp;aname=99990003&#38;amp;sc=00007397&#38;amp;al=2&#38;amp;ipc_type=CTN&#38;amp;ipc_nid=0&#34; id=&#34;poet_ctrl_o&#34;&#62;&#60;/script&#62;&#60;script id=&#34;poet_ctrl_4253623&#34; src=&#34;http://111.175.242.23/11092701/images/asd.js&#34; type=&#34;text/javascript&#34; defer=&#34;&#34;&#62;&#60;/script&#62;&#60;div id=&#34;poet_container&#34; style=&#34;position: absolute; z-index: 1000; overflow: hidden; bottom: 0px; right: 17px; display: block; width: 300px; height: 250px; background-color: transparent;&#34;&#62;&#60;div id=&#34;poet_normal_container&#34; style=&#34;display: block; width: 300px; height: 250px; [...]]]></description>
			<content:encoded><![CDATA[<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Olive;">&lt;</span><span style="color: Green;">html</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">head</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">title</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">论坛 BBS 论坛 -</span><span style="color: Olive;">&lt;/</span><span style="color: Green;">title</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">style</span><span style="color: Gray;"> </span><span style="color: #00008b;">type</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">text/css</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">body {margin: 0px;padding: 0px;overflow:hidden;}</span><span style="color: Olive;">&lt;/</span><span style="color: Green;">style</span><span style="color: Olive;">&gt;&lt;/</span><span style="color: Green;">head</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">body</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">iframe</span><span style="color: Gray;"> </span><span style="color: #00008b;">height</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">100%</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">frameborder</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">0</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">width</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">100%</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">marginwidth</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">0</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">marginheight</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">0</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">src</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">fulliframe</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">id</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">fulliframe</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;&lt;/</span><span style="color: Green;">iframe</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">script</span><span style="color: Gray;"> </span><span style="color: #00008b;">type</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">text/javascript</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">language</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">javascript</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">frames[0].location=window.location;function c(){try{var f=frames[0];var d=f.document;(function(s){})(d.readyState);if(d</span><span style="color: Navy;">&amp;amp;&amp;amp;</span><span style="color: Gray;">('complete'==d.readyState)){document.title=d.title?d.title:'';}else{setTimeout('c()',10);}}catch(ex){try{document.domain=document.domain.replace(/^\w+\./,'');c();}catch(ex){}}};c();</span><span style="color: Olive;">&lt;/</span><span style="color: Green;">script</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">script</span><span style="color: Gray;"> </span><span style="color: #00008b;">type</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">text/javascript</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">language</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">javascript</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">src</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">http://61.172.192.71/pagead/ads.js?umask=90</span><span style="color: Navy;">&amp;amp;</span><span style="color: Red;">interval=0</span><span style="color: Navy;">&amp;amp;</span><span style="color: Red;">vask=3214807291</span><span style="color: Navy;">&amp;amp;</span><span style="color: Red;">uid=2800005159</span><span style="color: Navy;">&amp;amp;</span><span style="color: Red;">pid=72057931677349889</span><span style="color: Navy;">&amp;amp;</span><span style="color: Red;">o_url=bbs.c1gstudio.com/</span><span style="color: Navy;">&amp;amp;</span><span style="color: Red;">aname=99990003</span><span style="color: Navy;">&amp;amp;</span><span style="color: Red;">sc=00007397</span><span style="color: Navy;">&amp;amp;</span><span style="color: Red;">al=2</span><span style="color: Navy;">&amp;amp;</span><span style="color: Red;">ipc_type=CTN</span><span style="color: Navy;">&amp;amp;</span><span style="color: Red;">ipc_nid=0</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">id</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">poet_ctrl_o</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;&lt;/</span><span style="color: Green;">script</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">script</span><span style="color: Gray;"> </span><span style="color: #00008b;">id</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">poet_ctrl_4253623</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">src</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">http://111.175.242.23/11092701/images/asd.js</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">type</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">text/javascript</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">defer</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Olive;">&gt;&lt;/</span><span style="color: Green;">script</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">div</span><span style="color: Gray;"> </span><span style="color: #00008b;">id</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">poet_container</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">style</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">position: absolute; z-index: 1000; overflow: hidden; bottom: 0px; right: 17px; display: block; width: 300px; height: 250px; background-color: transparent;</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">div</span><span style="color: Gray;"> </span><span style="color: #00008b;">id</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">poet_normal_container</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">style</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">display: block; width: 300px; height: 250px; background-color: transparent;</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">object</span><span style="color: Gray;"> </span><span style="color: #00008b;">height</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">250</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">width</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">300</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">codebase</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">classid</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">clsid:D27CDB6E-AE6D-11cf-96B8-444553540000</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">id</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">poet_normal_media</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"> </span><span style="color: Olive;">&lt;</span><span style="color: Green;">param</span><span style="color: Gray;"> </span><span style="color: #00008b;">value</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">http://111.175.242.23/11092701//media/normal_outer.swf?random=0.15569394237079814</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">movie</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">param</span><span style="color: Gray;"> </span><span style="color: #00008b;">value</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">high</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">quality</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"> </span><span style="color: Olive;">&lt;</span><span style="color: Green;">param</span><span style="color: Gray;"> </span><span style="color: #00008b;">value</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">transparent</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">wmode</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"> </span><span style="color: Olive;">&lt;</span><span style="color: Green;">param</span><span style="color: Gray;"> </span><span style="color: #00008b;">value</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">menu</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"> </span><span style="color: Olive;">&lt;</span><span style="color: Green;">param</span><span style="color: Gray;"> </span><span style="color: #00008b;">value</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">allowfullscreen</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"> </span><span style="color: Olive;">&lt;</span><span style="color: Green;">param</span><span style="color: Gray;"> </span><span style="color: #00008b;">value</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">always</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">allowscriptaccess</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"> </span><span style="color: Olive;">&lt;</span><span style="color: Green;">embed</span><span style="color: Gray;"> </span><span style="color: #00008b;">height</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">250</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">width</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">300</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">allowscriptaccess</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">always</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">allowfullscreen</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">wmode</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">transparent</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">type</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">application/x-shockwave-flash</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">pluginspage</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">http://www.macromedia.com/go/getflashplayer</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">quality</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">high</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">src</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">poet_normal_media</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"> </span><span style="color: Olive;">&lt;/</span><span style="color: Green;">object</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"> </span><span style="color: Olive;">&lt;/</span><span style="color: Green;">div</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">div</span><span style="color: Gray;"> </span><span style="color: #00008b;">id</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">poet_changed_container</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">style</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">display: none; width: 90px; height: 90px; background-color: transparent;</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">object</span><span style="color: Gray;"> </span><span style="color: #00008b;">height</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">90</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">width</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">90</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">codebase</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">classid</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">clsid:D27CDB6E-AE6D-11cf-96B8-444553540000</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">id</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">poet_changed_media</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"> </span><span style="color: Olive;">&lt;</span><span style="color: Green;">param</span><span style="color: Gray;"> </span><span style="color: #00008b;">value</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">http://111.175.242.23/11092701//media/changed_outer.swf?random=0.06770439522056959</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">movie</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">param</span><span style="color: Gray;"> </span><span style="color: #00008b;">value</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">high</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">quality</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"> </span><span style="color: Olive;">&lt;</span><span style="color: Green;">param</span><span style="color: Gray;"> </span><span style="color: #00008b;">value</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">transparent</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">wmode</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"> </span><span style="color: Olive;">&lt;</span><span style="color: Green;">param</span><span style="color: Gray;"> </span><span style="color: #00008b;">value</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">menu</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"> </span><span style="color: Olive;">&lt;</span><span style="color: Green;">param</span><span style="color: Gray;"> </span><span style="color: #00008b;">value</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">allowfullscreen</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"> </span><span style="color: Olive;">&lt;</span><span style="color: Green;">param</span><span style="color: Gray;"> </span><span style="color: #00008b;">value</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">always</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">allowscriptaccess</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"> </span><span style="color: Olive;">&lt;</span><span style="color: Green;">embed</span><span style="color: Gray;"> </span><span style="color: #00008b;">height</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">90</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">width</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">90</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">allowscriptaccess</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">always</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">allowfullscreen</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">wmode</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">transparent</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">type</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">application/x-shockwave-flash</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">pluginspage</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">http://www.macromedia.com/go/getflashplayer</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">quality</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">high</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">src</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">http://111.175.242.23/11092701//media/changed_outer.swf?random=0.06770439522056959</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">name</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">poet_changed_media</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"> </span><span style="color: Olive;">&lt;/</span><span style="color: Green;">object</span><span style="color: Olive;">&gt;</span><span style="color: Gray;"> </span><span style="color: Olive;">&lt;/</span><span style="color: Green;">div</span><span style="color: Olive;">&gt;&lt;/</span><span style="color: Green;">div</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">iframe</span><span style="color: Gray;"> </span><span style="color: #00008b;">scrolling</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">no</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">height</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">1</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">frameborder</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">0</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">width</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">1</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">style</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">background-color: transparent;</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">allowtransparency</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">true</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">src</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">http://111.175.242.23/11092701//impression.html?http://bbs.c1gstudio.com/</span><span style="color: Navy;">&amp;amp;</span><span style="color: Red;">random=0.5794684533460333</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;&lt;/</span><span style="color: Green;">iframe</span><span style="color: Olive;">&gt;&lt;/</span><span style="color: Green;">body</span><span style="color: Olive;">&gt;&lt;/</span><span style="color: Green;">html</span><span style="color: Olive;">&gt;</span></li></ol></div>
<p>论坛右下角偶尔刷新会出现广告弹窗,整个论坛被包含在一个IFRAME里,<br />
本以为是被挂马,搜了下这个111.175.242.23 IP是湖北省武汉市电信,网上很多论坛也遭殃了.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.c1gstudio.com/archives/1265/feed</wfw:commentRss>
		</item>
		<item>
		<title>(小技巧)用EXCEL的CONCATENATE合并列整理数据</title>
		<link>http://blog.c1gstudio.com/archives/1262</link>
		<comments>http://blog.c1gstudio.com/archives/1262#comments</comments>
		<pubDate>Tue, 11 Oct 2011 06:55:22 +0000</pubDate>
		<dc:creator>C1G</dc:creator>
		
		<category><![CDATA[其它]]></category>

		<category><![CDATA[项目管理]]></category>

		<category><![CDATA[excel]]></category>

		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://blog.c1gstudio.com/?p=1262</guid>
		<description><![CDATA[当需要将很多乱七八遭的数据导入MYSQL时可以用excel整理后再导.
例:
表中有两个字段需从EXCEL中导入数据
jobname,description
已初步整理的Sheet1
A,B,C,D
名称1,职位名1 ,介绍abcd,上海
名称2,职位名2 ,介绍abcd,北京
1.输入公式
Sheet2
单击A1单元格输入公式
=CONCATENATE(&#34;'&#34;,Sheet1!A1,&#34;:&#34;,Sheet1!B1,&#34;'&#34;)
单击B1单元格输入公式
=CONCATENATE(&#34;'&#60;p&#62;&#60;strong&#62;介绍&#60;/strong&#62;&#34;,Sheet1!C1,&#34;&#60;/p&#62;&#60;p&#62;&#60;strong&#62;地点&#60;/strong&#62;&#34;,Sheet1!D1,&#34;&#60;/p&#62;'&#34;)
ps:
也可以直接写成sql
=CONCATENATE(&#34;INSERT INTO table (jobname,description) VALUES ('&#34;,Sheet1!A1,&#34;:&#34;,Sheet1!B1,&#34;',&#34;,&#34;'&#60;p&#62;&#60;strong&#62;介绍&#60;/strong&#62;&#34;,Sheet1!C1,&#34;&#60;/p&#62;&#60;p&#62;&#60;strong&#62;地点&#60;/strong&#62;&#34;,Sheet1!D1,&#34;&#60;/p&#62;')&#34;)
2.复制公式
然后向下拖动复制行格式,这样Sheet2中A,B列就会显示Sheet1中合并的格式.
3.csv格式
另存为成csv,用editplus打开再另存为utf8格式.
4.phpmyadmin导入
CSV 使用 LOAD DATA;
字段分隔符,
文字分隔符'
完成
]]></description>
			<content:encoded><![CDATA[<p>当需要将很多乱七八遭的数据导入MYSQL时可以用excel整理后再导.</p>
<p>例:<br />
表中有两个字段需从EXCEL中导入数据<br />
jobname,description</p>
<p>已初步整理的Sheet1<br />
A,B,C,D<br />
名称1,职位名1 ,介绍abcd,上海<br />
名称2,职位名2 ,介绍abcd,北京</p>
<p><strong>1.输入公式</strong><br />
Sheet2<br />
单击A1单元格输入公式</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">=CONCATENATE(&quot;'&quot;,Sheet1!A1,&quot;:&quot;,Sheet1!B1,&quot;'&quot;)</li></ol></div>
<p>单击B1单元格输入公式</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">=CONCATENATE(&quot;'&lt;p&gt;&lt;strong&gt;介绍&lt;/strong&gt;&quot;,Sheet1!C1,&quot;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;地点&lt;/strong&gt;&quot;,Sheet1!D1,&quot;&lt;/p&gt;'&quot;)</li></ol></div>
<p>ps:<br />
也可以直接写成sql</strong></p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">=CONCATENATE(&quot;INSERT INTO table (jobname,description) VALUES ('&quot;,Sheet1!A1,&quot;:&quot;,Sheet1!B1,&quot;',&quot;,&quot;'&lt;p&gt;&lt;strong&gt;介绍&lt;/strong&gt;&quot;,Sheet1!C1,&quot;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;地点&lt;/strong&gt;&quot;,Sheet1!D1,&quot;&lt;/p&gt;')&quot;)</li></ol></div>
<p><strong>2.复制公式</strong><br />
然后向下拖动复制行格式,这样Sheet2中A,B列就会显示Sheet1中合并的格式.</p>
<p><strong>3.csv格式</strong><br />
另存为成csv,用editplus打开再另存为utf8格式.</p>
<p><strong>4.phpmyadmin导入</strong><br />
CSV 使用 LOAD DATA;<br />
字段分隔符,<br />
文字分隔符'</p>
<p>完成</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.c1gstudio.com/archives/1262/feed</wfw:commentRss>
		</item>
		<item>
		<title>修改numa和io调度优化mysql性能</title>
		<link>http://blog.c1gstudio.com/archives/1260</link>
		<comments>http://blog.c1gstudio.com/archives/1260#comments</comments>
		<pubDate>Sun, 09 Oct 2011 08:05:46 +0000</pubDate>
		<dc:creator>C1G</dc:creator>
		
		<category><![CDATA[Mysql]]></category>

		<category><![CDATA[io调度]]></category>

		<category><![CDATA[mysql]]></category>

		<category><![CDATA[numa]]></category>

		<category><![CDATA[优化]]></category>

		<guid isPermaLink="false">http://blog.c1gstudio.com/?p=1260</guid>
		<description><![CDATA[一.NUMA设置
单机单实例，建议关闭NUMA，关闭的方法有三种：
1.硬件层，在BIOS中设置关闭；
2.OS内核，启动时设置numa=off；
3.可以用numactl命令将内存分配策略修改为interleave（交叉）
方法3
修改mysql.server 330行加上numactl
vi /opt/mysql/bin/mysql.server
/usr/bin/numactl --interleave all $bindir/mysqld_safe --datadir=$datadir --pid-file=$server_pid_file $other_args &#62;/dev/null 2&#62;&#38;1 &#38;
wait_for_pid created $!; return_value=$?
numastat 查看内存分配
node0&#160; &#160; &#160; &#160; &#160; &#160;node1
numa_hit&#160; &#160; &#160; &#160; &#160; &#160; &#160;56506002860&#160; &#160; 201877592362
numa_miss&#160; &#160; &#160; &#160; &#160; &#160; &#160;9099468163&#160; &#160; &#160; 1450668930
numa_foreign&#160; &#160; &#160; &#160; &#160; 1450668930&#160; &#160; &#160; 9099468163
interleave_hit&#160; &#160; &#160; &#160; &#160; &#160;6205106&#160; &#160; &#160; &#160; &#160;4793392
local_node&#160; [...]]]></description>
			<content:encoded><![CDATA[<p><strong>一.NUMA设置</strong><br />
单机单实例，建议关闭NUMA，关闭的方法有三种：<br />
1.硬件层，在BIOS中设置关闭；<br />
2.OS内核，启动时设置numa=off；<br />
3.可以用numactl命令将内存分配策略修改为interleave（交叉）</p>
<p><strong>方法3</strong><br />
修改mysql.server 330行加上numactl<br />
vi /opt/mysql/bin/mysql.server</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">/usr/bin/numactl --interleave all $bindir/mysqld_safe --datadir=$datadir --pid-file=$server_pid_file $other_args &gt;/dev/null 2&gt;&amp;1 &amp;</li>
<li>wait_for_pid created $!; return_value=$?</li></ol></div>
<p>numastat 查看内存分配</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">node0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;node1</li>
<li>numa_hit&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;56506002860&nbsp; &nbsp; 201877592362</li>
<li>numa_miss&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;9099468163&nbsp; &nbsp; &nbsp; 1450668930</li>
<li>numa_foreign&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1450668930&nbsp; &nbsp; &nbsp; 9099468163</li>
<li>interleave_hit&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;6205106&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4793392</li>
<li>local_node&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;56485823400&nbsp; &nbsp; 201848609519</li>
<li>other_node&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 9119647623&nbsp; &nbsp; &nbsp; 1479651773</li></ol></div>
<p><strong>二.IO调度算法</strong><br />
Linux有四种IO调度算法：CFQ，Deadline，Anticipatory和NOOP，CFQ是默认的IO调度算法。完全随机的访问环境下，CFQ与Deadline，NOOP性能差异很小，但是一旦有大的连续IO，CFQ可能会造成小IO的响应延时增加，所以数据库环境建议修改为deadline算法，表现更稳定。<br />
IO调度算法都是基于磁盘设计，所以减少磁头移动是最重要的考虑因素之一，但是使用Flash存储设备之后，不再需要考虑磁头移动的问题，可以使用NOOP算法。NOOP的含义就是NonOperation，意味着不会做任何的IO优化，完全按照请求来FIFO的方式来处理IO。</p>
<p><strong>IO调度,默认cfq</strong><br />
echo 'deadline' > /sys/block/sdb/queue/scheduler<br />
cat /sys/block/sdb/queue/scheduler</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">noop anticipatory [deadline] cfq</li></ol></div>
<p><strong>减少预读,默认128</strong><br />
echo '16' > /sys/block/sda/queue/read_ahead_kb<br />
<strong>增大队列,默认128</strong><br />
echo '512' > /sys/block/sda/queue/nr_requests<br />
<strong>尽量不使用交换区,默认60</strong><br />
echo '0' > /proc/sys/vm/swappiness</p>
<p><strong>开机运行</strong><br />
vi /etc/rc.local</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">echo 'deadline' &gt; /sys/block/sdb/queue/scheduler</li>
<li>echo '16' &gt; /sys/block/sda/queue/read_ahead_kb</li>
<li>echo '512' &gt; /sys/block/sda/queue/nr_requests</li></ol></div>
<p>vi /etc/sysctl.conf</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">vm.swappiness=0</li></ol></div>
<p>参考:<br />
http://blog.wl0.org/2011/03/how-to-start-mysqld-using-numactl/<br />
http://jcole.us/blog/archives/2010/09/28/mysql-swap-insanity-and-the-numa-architecture/<br />
http://linuxcommand.org/man_pages/numactl8.html<br />
http://software.intel.com/zh-cn/blogs/2008/11/24/numaxeon1/<br />
http://www.mysqlops.com/2011/07/01/mysql_multi_using_numactl.html<br />
https://wickie.hlrs.de/platforms/index.php/Thread_And_Memory_Pinning<br />
http://www.cyberciti.biz/tips/linux-hugetlbfs-and-mysql-performance.html<br />
http://www.hellodb.net/2011/07/mysql-linux-hardware-tuning.html<br />
http://blog.csdn.net/liuben/article/details/5482167<br />
http://hatemysql.com/2011/07/05/mysql%E6%9C%BA%E5%99%A8%E9%85%8D%E7%BD%AE%E6%A0%87%E5%87%86/</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.c1gstudio.com/archives/1260/feed</wfw:commentRss>
		</item>
		<item>
		<title>避免'sudo echo x &gt;' 时'Permission denied'</title>
		<link>http://blog.c1gstudio.com/archives/1255</link>
		<comments>http://blog.c1gstudio.com/archives/1255#comments</comments>
		<pubDate>Fri, 30 Sep 2011 05:56:46 +0000</pubDate>
		<dc:creator>C1G</dc:creator>
		
		<category><![CDATA[Linux 命令]]></category>

		<category><![CDATA[sudo]]></category>

		<guid isPermaLink="false">http://blog.c1gstudio.com/?p=1255</guid>
		<description><![CDATA[sudo echo 268435456 &#62; /proc/sys/kernel/shmmax
bash: /proc/sys/kernel/shmmax: Permission denied
&#160;&#160;&#160; 这时 bash 拒绝这么做，说是权限不够。这是因为重定向符号 “&#62;” 和 "&#62;&#62;" 也是 bash 的命令。sudo 只是让 echo 命令具有了 root 权限，但是没有让 “&#62;” 和 "&#62;&#62;" 命令也具有root 权限，所以 bash 会认为这两个命令都没有写入信息的权限。
&#160;&#160;&#160; 解决这一问题的途径有两种。第一种是利用 "sh -c" 命令，它可以让 bash 将一个字串作为完整的命令来执行，这样就可以将 sudo 的影响范围扩展到整条命令。具体用法如下：
sudo sh -c 'echo 268435456 > /proc/sys/kernel/shmmax'
&#160;&#160;&#160; 另一种方法是利用管道和 tee 命令，该命令可以从标准输入中读入信息并将其写入标准输出或文件中，具体用法如下：
echo "268435456 " &#124; sudo tee -a test.txt
&#160;&#160;&#160; 注意，tee 命令de [...]]]></description>
			<content:encoded><![CDATA[<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">sudo echo 268435456 &gt; /proc/sys/kernel/shmmax</li></ol></div>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">bash: /proc/sys/kernel/shmmax: Permission denied</li></ol></div>
<p><P>&nbsp;&nbsp;&nbsp; 这时 bash 拒绝这么做，说是权限不够。这是因为重定向符号 “&gt;” 和 "&gt;&gt;" 也是 bash 的命令。sudo 只是让 echo 命令具有了 root 权限，但是没有让 “&gt;” 和 "&gt;&gt;" 命令也具有root 权限，所以 bash 会认为这两个命令都没有写入信息的权限。</P><br />
<P>&nbsp;&nbsp;&nbsp; 解决这一问题的途径有两种。第一种是利用 "sh -c" 命令，它可以让 bash 将一个字串作为完整的命令来执行，这样就可以将 sudo 的影响范围扩展到整条命令。具体用法如下：</P><br />
sudo sh -c 'echo 268435456 > /proc/sys/kernel/shmmax'</p>
<p><P>&nbsp;&nbsp;&nbsp; 另一种方法是利用管道和 tee 命令，该命令可以从标准输入中读入信息并将其写入标准输出或文件中，具体用法如下：</P></p>
<p>echo "268435456 " | sudo tee -a test.txt<br />
<P>&nbsp;&nbsp;&nbsp; 注意，tee 命令de "-a" 选项的作用等同于 "&gt;&gt;" 命令，如果去除该选项，那么 tee 命令的作用就等同于 "&gt;" 命令。</P></p>
<p><strong>cd时的错误</strong><br />
sudo cd /var/log/audit<br />
sudo: cd: command not found</p>
<p>cd是shell内置的,不是普通的命令,所以不能通过sudo运行<br />
如果确实需要运行cd,可以先输入sudo -s,变成root@hostname再cd</p>
<p>======================================<br />
2011-11-03更新<br />
sudo 命令时会经常找不路径,给普通用户增加路径变量就可以解决<br />
vi ~/.bash_profile</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">PATH=$PATH:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin/</li>
<li>#增加一行 </li>
<li>export PATH</li></ol></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.c1gstudio.com/archives/1255/feed</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.445 seconds -->
<!-- Cached page served by WP-Cache -->

