{"id":380,"date":"2004-02-25T09:15:45","date_gmt":"2004-02-25T01:15:45","guid":{"rendered":"http:\/\/192.168.50.160\/wordpress\/?p=380"},"modified":"2004-02-25T09:15:45","modified_gmt":"2004-02-25T01:15:45","slug":"php-%e5%bf%ab%e5%8f%96%e5%8a%a0%e9%80%9f%e5%99%a8%ef%bc%9aturck-mmcache","status":"publish","type":"post","link":"https:\/\/history.dowdot.idv.tw\/?p=380","title":{"rendered":"PHP \u5feb\u53d6\u52a0\u901f\u5668\uff1aTurck MMCache"},"content":{"rendered":"<p>#### \u672c\u7bc7\u6587\u7ae0 \u65bc20070802 \u7531MT\u7cfb\u7d71\u5408\u4f75\u81f3\u6b64 ####<\/p>\n<p>\u6703\u767c\u73fe\u9019\u8edf\u9ad4\u662f\u540c\u4e8b\u544a\u8a34\u6211\u7684<\/p>\n<p>\u7576\u4ed6\u73fe\u5834show\u7d66\u6211\u770b\u548c\u76f8\u6bd4\u4e4b\u4e0b<\/p>\n<p>\u6548\u80fd\u53ef\u8aaa\u662f\u5feb\u4e86\u5f88\u591a\u5f88\u591a<\/p>\n<p>\u6240\u4ee5\u9019\u9ebc\u597d\u7684\u6771\u897f\u4e0d\u88dd\u600e\u9ebc\u53ef\u4ee5<\/p>\n<p>\u8001\u5be6\u8aaa\u9019\u5957\u8edf\u9ad4\u53ef\u8aaa\u883b\u597d\u5b89\u88dd\u7684<\/p>\n<p>\u53ef\u662f\u6211\u537b\u88dd\u4e86\u597d\u5e7e\u5929\u624d\u88dd\u6210?<\/p>\n<p>\u539f\u56e0\u5c31\u51fa\u5728php.ini<\/p>\n<p>Fedora\u9810\u8a2d\u7684php.ini\u662f\u5728\/etc\/php.ini<\/p>\n<p>\u4f46\u6211\u5fd8\u4e86\u6211\u7684apache\u662f\u81ea\u5df1\u4e0b\u8f09tarball\u91cd\u65b0<\/p>\n<p>complile\u7684 php.ini\u7684\u8def\u5f91\u5728\/usr\/loca\/lib\/php.ini<\/p>\n<p>\u5c31\u56e0\u6b64\u591a\u82b1\u4e86\u597d\u5e7e\u5929\u7684\u6642\u9593.............<\/p>\n<p>\u4ee5\u4e0b\u5c31\u662fmmcache\u7684\u7c21\u4ecb\u53ca\u5b89\u88dd\u65b9\u5f0f<\/p>\n<p>(\u5b98\u65b9\u7db2\u7ad9:http:\/\/turck-mmcache.sourceforge.net)<\/p>\n<blockquote><p>\nTurck MMCache \u662f\u4e00\u7a2e\u9069\u7528\u65bc PHP \u7684 opcode \u5feb\u53d6\uff0c\u5b83\u7684\u4f5c\u7528\u985e\u540c\u65bc Zend Accelerator\uff0c\u4e3b\u8981\u662f\u5c07PHP\u7de8\u8b6f\u7d50\u679c\u7684\u72c0\u614b\u4e88\u4ee5\u5feb\u53d6\uff0c\u4ee5\u6e1b\u8f15 Server \u7684\u8ca0\u8f09\u3002Turck MMCache \u540c\u6642\u4e5f\u5177\u5099\u512a\u5316 PHP \u7a0b\u5f0f\u901f\u5ea6\u7684\u5f01\u9044A\u53ef\u8b93\u60a8\u7684\u7a0b\u5f0f\u52a0\u5feb1~10\u500d\u3002<\/p>\n<p>\u5982\u679c\u60a8\u7684\u7db2\u7ad9\u4e3b\u8981\u662f\u4ee5 PHP \u5efa\u69cb\uff0c\u800c\u4e14\u76f8\u7576\u71b1\u9580\uff0cLoading \u4e00\u5411\u5f88\u91cd\uff0c\u90a3\u9ebc\u60a8\u61c9\u8a72\u8a66\u8a66 Turck MMCache \u7684\u5a01\u529b\u3002(\u5c0f\u5f1f\u8a66\u7528\u7684\u7d50\u679c\uff0c\u5b83\u6bd4 Zend Accelerator \u66f4\u7a69\u5b9a\u597d\u7528\u54e9\u3002)<\/p>\n<p>\u6839\u64da\u5206\u6790\uff0cTurck MMCache \u76ee\u524d\u7684\u8a55\u6bd4\u5c45\u696d\u754c\u8001\u4e8c\uff0c\u50c5\u6bd4 Zend Accelerator \u843d\u5f8c\u4e9b\u5fae\u5dee\u8ddd\u3002<\/p><\/blockquote>\n<p>\u5feb\u901f\u5b89\u88dd\u6cd5\uff1a<br \/>\nQuick install<br \/>\n-------------<br \/>\n\u6b65\u9a5f 1. \u7de8\u8b6f Turck MMCache<\/p>\n<p>phpize<\/p>\n<p>.\/configure --enable-mmcache=shared<\/p>\n<p>make<\/p>\n<p>\u6b65\u9a5f 2. \u5b89\u88dd Turck MMCache<\/p>\n<p>make install<\/p>\n<p>(\u6ce8\u610f! \u57f7\u884c\u6b64\u52d5\u4f5c\u4e4b\u5f8c\uff0c\u6703\u51fa\u73fe mmcache.so \u7684\u5b89\u88dd\u8def\u5f91\uff0c\u8a72\u8def\u5f91\u8981\u5728 php.ini \u4e2d\u8a2d\u5b9a)<\/p>\n<p>\u6b65\u9a5f 3. \u8a2d\u5b9a Turck MMCache<\/p>\n<p>Turck MMCache \u53ef\u4ee5\u88ab\u5b89\u88dd\u6210 Zend \u6216 PHP \u64f4\u5c55\u5143\u4ef6, \u6240\u4ee5\u60a8\u5fc5\u9808\u7de8\u8f2f\u4f60\u7684 php.ini \u6a94 (\u901a\u5e38\u662f \/etc\/php.ini \u6216 \/usr\/local\/lib\/php.ini).<\/p>\n<p>\u6b32\u5b89\u88dd\u6210 Zend \u64f4\u5c55\u5143\u4ef6\u8005:<\/p>\n<p>zend_extension=\"\/usr\/lib\/php4\/mmcache.so\" (\u8def\u5f91\u8981\u518d\u4fee\u6539, \u8996\u60a8\u5b89\u88dd\u7d50\u679c\u800c\u5b9a)<br \/>\nmmcache.shm_size=\"16\"<br \/>\nmmcache.cache_dir=\"\/tmp\/mmcache\"<br \/>\nmmcache.enable=\"1\"<br \/>\nmmcache.optimizer=\"1\"<br \/>\nmmcache.check_mtime=\"1\"<br \/>\nmmcache.debug=\"0\"<br \/>\nmmcache.filter=\"\"<\/p>\n<p>\u6b32\u5b89\u88dd\u6210 PHP \u64f4\u5c55\u5143\u4ef6\u8005:<\/p>\n<p>extension=\"mmcache.so\" (\u8def\u5f91\u8981\u518d\u4fee\u6539)<br \/>\nmmcache.shm_size=\"16\"<br \/>\nmmcache.cache_dir=\"\/tmp\/mmcache\"<br \/>\nmmcache.enable=\"1\"<br \/>\nmmcache.optimizer=\"1\"<br \/>\nmmcache.check_mtime=\"1\"<br \/>\nmmcache.debug=\"0\"<br \/>\nmmcache.filter=\"\"<\/p>\n<p>\u8acb\u6ce8\u610f extension \u7684\u8def\u5f91\u8981\u548c \u6b65\u9a5f 2 \u5b89\u88dd\u5b8c\u5f8c\u7684\u8def\u5f91\u4e00\u81f4!<\/p>\n<p>\u6b65\u9a5f 4. \u8a2d\u7f6e cache \u76ee\u9304<\/p>\n<p>mkdir \/tmp\/mmcache<br \/>\nchmod 0777 \/tmp\/mmcache<\/p>\n<p>\u6b65\u9a5f 5. \u91cd\u65b0\u555f\u52d5 Apache<\/p>\n<p>\/home\/apach2\/bin\/apachectl restart<\/p>\n<p>\u6b65\u9a5f 6. \u89c0\u770b phpinfo<\/p>\n<p>\u82e5\u51fa\u73fe\u5982\u4e0b\u5716\u6240\u793a\uff0c\u5247\u8868\u793a\u6210\u6c40o\u3002<\/p>\n<p>Turck MMCache \u5d4c\u5165PHP\u57f7\u884c\u5716<\/p>\n<p>\u6b65\u9a5f 7. \u8a2d\u7f6e web \u7ba1\u7406\u4ecb\u9762<\/p>\n<p>\u5c07 mmcache.php \u62f7\u8c9d\u5230\u60a8\u7684 web \u4e0b\u67d0\u4e00\u5b50\u76ee\u9304\u4e2d\uff0c<br \/>\n\u70ba\u5b89\u5168\u8a08\uff0c\u8acb\u8a2d\u59a5\u57f7\u884c\u9650\u5236\uff0c\u4f7f\u4e4b\u50c5\u9650\u65bc\u60a8\u7684 local IP\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>#### \u672c\u7bc7\u6587\u7ae0 \u65bc20070802 \u7531MT\u7cfb\u7d71\u5408\u4f75\u81f3\u6b64 #### \u6703\u767c\u73fe\u9019\u8edf\u9ad4\u662f\u540c\u4e8b\u544a\u8a34\u6211\u7684 \u7576\u4ed6\u73fe\u5834show\u7d66\u6211\u770b\u548c\u76f8\u6bd4\u4e4b\u4e0b \u6548\u80fd\u53ef\u8aaa\u662f\u5feb\u4e86\u5f88\u591a\u5f88\u591a \u6240\u4ee5\u9019\u9ebc\u597d\u7684\u6771\u897f\u4e0d\u88dd\u600e\u9ebc\u53ef\u4ee5 \u8001\u5be6\u8aaa\u9019\u5957\u8edf\u9ad4\u53ef\u8aaa\u883b\u597d\u5b89\u88dd\u7684 \u53ef\u662f\u6211\u537b\u88dd\u4e86\u597d\u5e7e\u5929\u624d\u88dd\u6210? \u539f\u56e0\u5c31\u51fa\u5728php.ini Fedora\u9810\u8a2d\u7684php.in&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"ngg_post_thumbnail":0,"spay_email":""},"categories":[8],"tags":[],"jetpack_featured_media_url":"","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5NCTI-68","_links":{"self":[{"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/380"}],"collection":[{"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=380"}],"version-history":[{"count":0,"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/380\/revisions"}],"wp:attachment":[{"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}