{"id":169,"date":"2016-12-08T17:05:32","date_gmt":"2016-12-08T09:05:32","guid":{"rendered":"http:\/\/www.secondsend.com\/wordpress\/?p=169"},"modified":"2016-12-09T15:01:47","modified_gmt":"2016-12-09T07:01:47","slug":"centos%e5%ae%89%e8%a3%85memcahced","status":"publish","type":"post","link":"http:\/\/www.homconnect.cn\/?p=169","title":{"rendered":"centos\u5b89\u88c5memcahced"},"content":{"rendered":"<h2>\u4e00\u3001\u5b89\u88c5memcached<\/h2>\n<p><strong>1.\u5b89\u88c5\u4f9d\u8d56\u5305libevent<\/strong><\/p>\n<p>yum install libevent-devel -y<\/p>\n<p><strong>2.\u5b89\u88c5memcached<\/strong><!--more--><\/p>\n<p>yum install memcached -y<\/p>\n<p><b>3.\u914d\u7f6ememcached\u81ea\u542f\u52a8\u00a0<\/b><\/p>\n<p>systemctl enable memcached<\/p>\n<p>systemctl start memcached<\/p>\n<h2>\u4e8c\u3001\u5b89\u88c5php-memcahced\u62d3\u5c55<\/h2>\n<p>1.\u5b89\u88c5\u4f9d\u8d56zlib\u548clibmemcached<\/p>\n<p>yum install zlib-devel -y<\/p>\n<p>yum install libmemcached-devel -y<\/p>\n<p>2.\u5b89\u88c5memcached\u62d3\u5c55<\/p>\n<p>\u5728PECL\uff08The PHP Extension Community Library\uff09\u627e\u5230\u5e76\u5b89\u88c5php\u7684memcached\u6269\u5c55\u3002<\/p>\n<p>\u4f8b\uff1a<\/p>\n<blockquote><p>mkdir \/usr\/src\/php -p<br \/>\ncd \/usr\/src\/php<br \/>\nwget https:\/\/pecl.php.net\/get\/memcached -O memcached-2.2.0.tgz<br \/>\ntar xf memcached-2.2.0.tgz<br \/>\ncd memcached-2.2.0<br \/>\nphpize<br \/>\n# \u6211\u4eec\u5728\u914d\u7f6e\u7684\u6dfb\u52a0\u4e00\u4e9b\u65b0\u7684\u529f\u80fd\uff0c\u4f7f\u5176\u652f\u6301json\u548cigbinary\uff0c\u6709\u7a7a\u53ef\u4ee5\u7814\u7a76\u4e00\u4e0b<br \/>\n.\/configure &#8211;enable-memcached &#8211;with-php-config=\/usr\/bin\/php-config<br \/>\nmake<br \/>\nmake install<br \/>\n# \u6ce8\u610f\u6700\u540e\u7684\u8f93\u51fa<br \/>\n#Installing shared extensions: \/usr\/lib64\/php\/modules\/<\/p><\/blockquote>\n<p>3.\u589e\u52a0\u62d3\u5c55\u914d\u7f6e<\/p>\n<p>vim \/etc\/php.d\/memcached.ini<\/p>\n<blockquote><p>#\u589e\u52a0\u4e00\u884c<\/p>\n<p>extension=memcached.so<\/p><\/blockquote>\n<p>\u4fdd\u5b58\u9000\u51fa<\/p>\n<p>4.\u91cd\u542fphp\u8fdb\u7a0b\uff0c\u67e5\u770bphpinfo<\/p>\n<p>&nbsp;<\/p>\n<p>\u6ce8\uff1ayum\u5b89\u88c5\u7684\u90fd\u5728\u9ed8\u8ba4\u4f4d\u7f6e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u5b89\u88c5memcached 1.\u5b89\u88c5\u4f9d\u8d56\u5305libevent yum install libevent-deve &hellip; <a href=\"http:\/\/www.homconnect.cn\/?p=169\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201ccentos\u5b89\u88c5memcahced\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,15],"tags":[],"_links":{"self":[{"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=\/wp\/v2\/posts\/169"}],"collection":[{"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=169"}],"version-history":[{"count":2,"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=\/wp\/v2\/posts\/169\/revisions"}],"predecessor-version":[{"id":173,"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=\/wp\/v2\/posts\/169\/revisions\/173"}],"wp:attachment":[{"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=169"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.homconnect.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}