{"id":482,"date":"2013-07-03T14:23:56","date_gmt":"2013-07-03T06:23:56","guid":{"rendered":"http:\/\/www.ln.la\/?p=482"},"modified":"2013-07-03T14:23:56","modified_gmt":"2013-07-03T06:23:56","slug":"lnmp1-0-php5-4-x-memcache","status":"publish","type":"post","link":"https:\/\/www.lnlog.cn\/index.php\/2013\/07\/03\/lnmp1-0-php5-4-x-memcache\/","title":{"rendered":"\u89e3\u51b3\u519b\u54e5lnmp1.0\u9ed8\u8ba4\u5b89\u88c5\u540ephp\u4ece5.3.x\u5347\u7ea7\u52305.4.x\u540ememcache.sh\u5b89\u88c5\u95ee\u9898"},"content":{"rendered":"<p>lnmp1.0\u9ed8\u8ba4\u5b89\u88c5\u540ephp\u7248\u672c\u4e3a5.3.17\u3002\u5347\u7ea7php5.3.X\u548c5.4.X\u540e\u4e24\u79cd\u60c5\u51b5\uff0c\u518d\u6267\u884cmemcache.sh\u5b89\u88c5\u7b2c\u4e00\u79cd\u6ca1\u95ee\u9898\u5982\u4e0b\u7b2c\u4e00\u6b65\u9aa4\uff0c\u7b2c\u4e8c\u79cd\u4f1a\u51fa\u73b0\u95ee\u9898\uff0c\u5219\u5982\u4e0b\u7b2c\u4e8c\u6b65\u9aa4\u89e3\u51b3\uff1a<\/p>\n<p><span style=\"color: #ff0000;\">\u4e00\uff1a<\/span>\u5982\u679c\u60f3\u4ecephp5.3.17\u5347\u7ea7\u4e3a\u65b0\u7248\u672c5.3.x\u540e\uff0c\u5f97\u91cd\u65b0\u5b89\u88c5memcache\u3002<\/p>\n<p><span style=\"color: #ff0000;\">1.<\/span>\u6267\u884c.\/upgrade_php.sh\uff0c\u8f93\u51655.3.x\u6700\u65b0\u7248\uff0c\u7136\u540e\u5347\u7ea7\u5b8c\u6bd5\u3002<\/p>\n<p><span style=\"color: #ff0000;\">2.<\/span>\u7136\u540e\u6267\u884cmemcache.sh\u5b89\u88c5\u5b8c\u6bd5\u3002ok\uff0c\u6267\u884c\/root\/lnmp restart,\u6253\u5f00memcached.php\u6d4b\u8bd5OK\uff1a<\/p>\n<p>Memcached Server version: 1.4.15<br \/>\nGet key1 value: This is first value<br \/>\nGet<br \/>\nkey1 value: This is replace value<br \/>\nGet key2 value: Array ( [0] =&gt; aaa [1]<br \/>\n=&gt; bbb [2] =&gt; ccc [3] =&gt; ddd )<br \/>\nGet key1 value:<br \/>\nGet key2 value:<\/p>\n<p><span style=\"color: #ff0000;\">\u4e8c\uff1a<\/span>\u5982\u679c\u60f3\u4ecephp5.3.17\u5347\u7ea7\u4e3a\u65b0\u7248\u672c5.4.x\u540e\uff0c\u4e5f\u5f97\u91cd\u65b0\u5b89\u88c5memcache\u3002<\/p>\n<p><span style=\"color: #ff0000;\">1.<\/span>\u6267\u884c.\/upgrade_php.sh\uff0c\u8f93\u51655.4.x\u6700\u65b0\u7248\uff0c\u7136\u540e\u5347\u7ea7\u5b8c\u6bd5\u3002<\/p>\n<p><span style=\"color: #ff0000;\">2.<\/span>\u4fee\u6539lnmp1.0-full\u5305\u91cc\u7684memcache.sh\uff0c\u627e\u5230\uff1a<\/p>\n<p><span style=\"color: #ff00ff;\">printf &#8220;=========================== install memcached ======================n&#8221;<\/span><\/p>\n<p><span style=\"color: #ff00ff;\">echo &#8220;Install memcache php extension&#8230;&#8221; wget -c http:\/\/soft.vpser.net\/web\/memcache\/memcache-3.0.6.tgz tar zxvf memcache-3.0.6.tgz cd memcache-3.0.6\/ \/usr\/local\/php\/bin\/phpize .\/configure &#8211;with-php-config=\/usr\/local\/php\/bin\/php-config make &amp;&amp; make install cd ..\/<\/span><\/p>\n<p>\u4fee\u6539\u4e3a\uff1a<\/p>\n<p><span style=\"color: #ff00ff;\">printf &#8220;=========================== install memcached ======================n&#8221;<\/span><\/p>\n<p><span style=\"color: #ff00ff;\">echo &#8220;Install memcache php extension&#8230;&#8221; wget -c http:\/\/pecl.php.net\/get\/memcache-3.0.8.tgz tar zxvf memcache-3.0.8.tgz cd memcache-3.0.8\/ \/usr\/local\/php\/bin\/phpize .\/configure &#8211;with-php-config=\/usr\/local\/php\/bin\/php-config make &amp;&amp; make install cd ..\/<\/span><\/p>\n<p>\u7136\u540e\u4e0a\u4f20\u4fdd\u5b58\uff0c\u6743\u9650\u6539\u4e3a0755<\/p>\n<p><span style=\"color: #ff0000;\">3.<\/span>\u6700\u540e\u6267\u884cmemcache.sh\u5b89\u88c5\u5b8c\u6bd5\u3002ok\uff0c\u6267\u884c\/root\/lnmp restart,\u6253\u5f00memcached.php\u6d4b\u8bd5OK\uff1a<\/p>\n<p>Memcached Server version: 1.4.15 Get key1 value: This is first value Get key1 value: This is replace value Get key2 value: Array ( [0] =&gt; aaa [1] =&gt; bbb [2] =&gt; ccc [3] =&gt; ddd ) Get key1 value: Get key2 value:<\/p>\n<p>\u603b\u7ed3\uff1a\u7f16\u8bd1PHP5.4.x\u4f7f\u7528\u7684PHP\u6838\u5fc3\u7248\u672c\u662f20100525\uff0c\u800c\u519b\u54e5lnmp1.0\u4e2dMemcache-3.0.6\u662f\u4f7f\u752820090626\u7248\u672c\u7f16\u8bd1\u7684\uff0c\u7248\u672c\u4e0d\u4e00\u81f4\u5bfc\u81f4PHP\u65e0\u6cd5\u542f\u7528memcache.so\u5e93\uff0c\u6545\u6539\u4e3aMemcache-3.0.8\uff0c\u6700\u540e\u751f\u4ea7\u73af\u5883\u76ee\u524d\u8fd8\u662f\u4e0d\u8981\u5347\u7ea7\u5230php5.5.X\u7248\u672c\uff01<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>lnmp1.0\u9ed8\u8ba4\u5b89\u88c5\u540ephp\u7248\u672c\u4e3a5.3.17\u3002\u5347\u7ea7php5.3.X\u548c5.4.X\u540e\u4e24\u79cd\u60c5\u51b5\uff0c\u518d\u6267\u884cmemca &hellip; <a href=\"https:\/\/www.lnlog.cn\/index.php\/2013\/07\/03\/lnmp1-0-php5-4-x-memcache\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u89e3\u51b3\u519b\u54e5lnmp1.0\u9ed8\u8ba4\u5b89\u88c5\u540ephp\u4ece5.3.x\u5347\u7ea7\u52305.4.x\u540ememcache.sh\u5b89\u88c5\u95ee\u9898<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[54,57,67,68],"class_list":["post-482","post","type-post","status-publish","format-standard","hentry","category-tech","tag-lnmp1-0","tag-memcache","tag-php5-3-x","tag-php5-4-x"],"_links":{"self":[{"href":"https:\/\/www.lnlog.cn\/index.php\/wp-json\/wp\/v2\/posts\/482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lnlog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lnlog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lnlog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lnlog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=482"}],"version-history":[{"count":0,"href":"https:\/\/www.lnlog.cn\/index.php\/wp-json\/wp\/v2\/posts\/482\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.lnlog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lnlog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lnlog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}