{"id":130,"date":"2022-07-06T22:43:34","date_gmt":"2022-07-06T14:43:34","guid":{"rendered":"https:\/\/miie.net\/?p=130"},"modified":"2022-07-06T22:43:34","modified_gmt":"2022-07-06T14:43:34","slug":"why-compile-and-install","status":"publish","type":"post","link":"https:\/\/diji.net\/?p=130","title":{"rendered":"\u4e3a\u4ec0\u4e48\u670d\u52a1\u5668\u8f6f\u4ef6\u9700\u8981\u7f16\u8bd1\u5b89\u88c5"},"content":{"rendered":"<p>\u4e3a\u4ec0\u4e48\u670d\u52a1\u5668\u8f6f\u4ef6\u9700\u8981\u7f16\u8bd1\u5b89\u88c5\uff1f\u4e00\u4e2a\u6d41\u4f20\u5f88\u5e7f\u7684\u8bf4\u6cd5\u662f\u7f16\u8bd1\u5b89\u88c5\u6027\u80fd\u66f4\u597d\uff0c\u5176\u5b9e\u8fd9\u662f\u4e2a\u8c23\u8a00\u3002<\/p>\n<p>\u670d\u52a1\u5668CPU\u4e8b\u5b9e\u5df2\u7ecf\u88abIntel\u5784\u65ad\u4e86\uff0c\u5c31\u90a3\u4e48\u51e0\u79cd\u578b\u53f7\uff0c\u7f16\u6765\u7f16\u53bb\u751f\u6210\u7684\u673a\u5668\u7801\u662f\u4e00\u6837\u7684\u3002Intel\u5ba3\u4f20\u81ea\u5df1\u7684\u7f16\u8bd1\u5de5\u5177Intel C++ Compiler \u6bd4GCC\u7f16\u8bd1\u51fa\u6765\u6027\u80fd\u8981\u63d0\u534710%-20%\uff0c\u8fd9\u5c31\u662f\u4e00\u5e7f\u544a\uff0c\u751f\u4ea7\u73af\u5883\u5f88\u5c11\u7528\u4eba\u7528\u5b83\uff0c\u4f55\u51b5\u5b83\u8fd8\u8981\u6536\u8d39\u3002<\/p>\n<p>\u6027\u80fd\u771f\u4e0d\u662f\u95ee\u9898\uff0c\u6bd4\u5982 strip \u547d\u4ee4\u53ef\u4ee5\u5927\u5927\u51cf\u5c0f\u53ef\u6267\u884c\u6587\u4ef6\u7684size\uff0c\u4f46\u662f\u6211\u88c5\u8fc7\u51e0\u5343\u904d\u8f6f\u4ef6\uff0c\u90fd\u6ca1\u6709\u89c1\u6709\u4eba\u5728\u5b89\u88c5\u811a\u672c\u91cc\u9762\u4f7f\u7528\u3002<\/p>\n<p>\u8f6f\u4ef6\u9700\u8981\u7f16\u8bd1\u5b89\u88c5\u7684\u771f\u5b9e\u7406\u7531\u6709\u5982\u4e0b3\u70b9\uff1a<\/p>\n<p>1.\u8f6f\u4ef6\u5728\u7f16\u8bd1\u671f\u95f4\u9700\u8981\u914d\u7f6e\uff0c\u6bd4\u5982\u8bf4nginx\uff0c\u9700\u8981\u5728\u7f16\u8bd1\u7684\u65f6\u5019\u6307\u5b9a\u5305\u542b\u54ea\u4e9bmodule\uff0cphp,apache \u4e5f\u662f\u4e00\u6837\u3002<br \/>\n\u540c\u6837\u7684\u662f\u6570\u636e\u5e93\uff0cmysql \u901a\u8fc7\u7f16\u8bd1\u5b89\u88c5\uff0c\u56e0\u4e3a\u8981\u5b9a\u5236\u5b58\u50a8\u5f15\u64ce\uff08\u662f\u5426\u652f\u6301innodb .. \uff09,\u800csqlite\u5374\u7edd\u5c11\u6709\u4eba\u7f16\u8bd1\uff0c\u90fd\u662f\u76f4\u63a5\u4e0b\u8f7d\u4e8c\u8fdb\u5236\u6587\u4ef6\u6765\u7528\u3002<\/p>\n<p>2.\u8f6f\u4ef6\u9700\u8981\u7edf\u4e00\u5b89\u88c5\u8def\u5f84\uff0c\u6bcf\u4e2ateam\u90fd\u4f1a\u81ea\u5df1\u7684\u5b89\u88c5\u76ee\u5f55\u7ea6\u5b9a\uff0c\u6709\u4e9b\u559c\u6b22\u88c5\u5728 \/opt\/\u4e0b\u9762\uff0c\u6709\u4e9b\u559c\u6b22\u88c5\u5728 \/usr\/local\/ ,\u7f16\u8bd1\u5b89\u88c5\u53ef\u4ee5\u65b9\u4fbf\u7684\u6307\u5b9a\u8fd9\u4e9b\u8def\u5f84\uff08configure --prefix=xxx \uff09\u3002<\/p>\n<p>3.\u9700\u8981\u6700\u65b0\u7684\u7248\u672c\uff0c\u8f6f\u4ef6\u4ed3\u5e93\u7684\u7248\u672c\u4e00\u822c\u90fd\u6bd4\u8f83\u4f4e\uff0c\u8fd9\u4e2a\u7406\u7531\u5176\u5b9e\u4e0d\u5145\u5206\uff0c\u751f\u4ea7\u73af\u5883\u503e\u5411\u4fdd\u5b88\uff0c\u4e0d\u8ffd\u6c42\u6700\u65b0\u7248\u672c\uff0c\u4f46\u662f\u5bf9\u4e8egeek\u6765\u8bf4\uff0c\u8fd9\u53ef\u80fd\u662f\u6700\u91cd\u8981\u7684\u539f\u56e0\u3002<\/p>\n<p>\u5f04\u660e\u767d\u539f\u56e0\u4e4b\u540e\uff0c\u5c31\u5f88\u5bb9\u6613\u5224\u65ad\u7f16\u8bd1\u8fd8\u662f\u4e0b\u8f7d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e3a\u4ec0\u4e48\u670d\u52a1\u5668\u8f6f\u4ef6\u9700\u8981\u7f16\u8bd1\u5b89\u88c5\uff1f\u4e00\u4e2a\u6d41\u4f20\u5f88\u5e7f\u7684\u8bf4\u6cd5\u662f\u7f16\u8bd1\u5b89\u88c5\u6027\u80fd\u66f4\u597d\uff0c\u5176\u5b9e\u8fd9\u662f\u4e2a\u8c23\u8a00\u3002 \u670d\u52a1\u5668CPU\u4e8b\u5b9e\u5df2\u7ecf\u88abIntel\u5784\u65ad\u4e86\uff0c\u5c31\u90a3\u4e48\u51e0\u79cd\u578b\u53f7\uff0c\u7f16\u6765\u7f16\u53bb\u751f\u6210\u7684\u673a\u5668\u7801\u662f\u4e00\u6837\u7684\u3002Intel\u5ba3\u4f20\u81ea\u5df1\u7684\u7f16\u8bd1\u5de5\u5177Intel C++ Compiler \u6bd4GCC\u7f16\u8bd1\u51fa\u6765\u6027\u80fd\u8981\u63d0\u534710%-20%\uff0c\u8fd9\u5c31\u662f\u4e00\u5e7f\u544a\uff0c\u751f\u4ea7\u73af\u5883\u5f88\u5c11\u7528\u4eba\u7528\u5b83\uff0c\u4f55\u51b5\u5b83\u8fd8\u8981\u6536\u8d39\u3002 \u6027\u80fd\u771f\u4e0d\u662f\u95ee\u9898\uff0c\u6bd4\u5982 strip \u547d\u4ee4\u53ef\u4ee5\u5927\u5927\u51cf\u5c0f\u53ef\u6267\u884c\u6587\u4ef6\u7684size\uff0c\u4f46\u662f\u6211\u88c5\u8fc7\u51e0\u5343\u904d\u8f6f\u4ef6\uff0c\u90fd\u6ca1\u6709\u89c1\u6709\u4eba\u5728\u5b89\u88c5\u811a\u672c\u91cc\u9762\u4f7f\u7528\u3002 \u8f6f\u4ef6\u9700\u8981\u7f16\u8bd1\u5b89\u88c5\u7684\u771f\u5b9e\u7406\u7531\u6709\u5982\u4e0b3\u70b9\uff1a 1.\u8f6f\u4ef6\u5728\u7f16\u8bd1\u671f\u95f4\u9700\u8981\u914d\u7f6e\uff0c\u6bd4\u5982\u8bf4nginx\uff0c\u9700\u8981\u5728\u7f16\u8bd1\u7684\u65f6\u5019\u6307\u5b9a\u5305\u542b\u54ea\u4e9bmodule\uff0cphp,apache \u4e5f\u662f\u4e00\u6837\u3002 \u540c\u6837\u7684\u662f\u6570\u636e\u5e93\uff0cmysql \u901a\u8fc7\u7f16\u8bd1\u5b89\u88c5\uff0c\u56e0\u4e3a\u8981\u5b9a\u5236\u5b58\u50a8\u5f15\u64ce\uff08\u662f\u5426\u652f\u6301innodb .. \uff09,\u800csqlite\u5374\u7edd\u5c11\u6709\u4eba\u7f16\u8bd1\uff0c\u90fd\u662f\u76f4\u63a5\u4e0b\u8f7d\u4e8c\u8fdb\u5236\u6587\u4ef6\u6765\u7528\u3002 2.\u8f6f\u4ef6\u9700\u8981\u7edf\u4e00\u5b89\u88c5\u8def\u5f84\uff0c\u6bcf\u4e2ateam\u90fd\u4f1a\u81ea\u5df1\u7684\u5b89\u88c5\u76ee\u5f55\u7ea6\u5b9a\uff0c\u6709\u4e9b\u559c\u6b22\u88c5\u5728 \/opt\/\u4e0b\u9762\uff0c\u6709\u4e9b\u559c\u6b22\u88c5\u5728 \/usr\/local\/ ,\u7f16\u8bd1\u5b89\u88c5\u53ef\u4ee5\u65b9\u4fbf\u7684\u6307\u5b9a\u8fd9\u4e9b\u8def\u5f84\uff08configure &#8211;prefix=xxx \uff09\u3002 3.\u9700\u8981\u6700\u65b0\u7684\u7248\u672c\uff0c\u8f6f\u4ef6\u4ed3\u5e93\u7684\u7248\u672c\u4e00\u822c\u90fd\u6bd4\u8f83\u4f4e\uff0c\u8fd9\u4e2a\u7406\u7531\u5176\u5b9e\u4e0d\u5145\u5206\uff0c\u751f\u4ea7\u73af\u5883\u503e\u5411\u4fdd\u5b88\uff0c\u4e0d\u8ffd\u6c42\u6700\u65b0\u7248\u672c\uff0c\u4f46\u662f\u5bf9\u4e8egeek\u6765\u8bf4\uff0c\u8fd9\u53ef\u80fd\u662f\u6700\u91cd\u8981\u7684\u539f\u56e0\u3002 \u5f04\u660e\u767d\u539f\u56e0\u4e4b\u540e\uff0c\u5c31\u5f88\u5bb9\u6613\u5224\u65ad\u7f16\u8bd1\u8fd8\u662f\u4e0b\u8f7d\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-130","post","type-post","status-publish","format-standard","hentry","category-debian"],"_links":{"self":[{"href":"https:\/\/diji.net\/index.php?rest_route=\/wp\/v2\/posts\/130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/diji.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/diji.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/diji.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/diji.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=130"}],"version-history":[{"count":0,"href":"https:\/\/diji.net\/index.php?rest_route=\/wp\/v2\/posts\/130\/revisions"}],"wp:attachment":[{"href":"https:\/\/diji.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/diji.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/diji.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}