{"id":10005964,"date":"2022-07-22T11:37:14","date_gmt":"2022-07-22T03:37:14","guid":{"rendered":"https:\/\/ityet.com\/?p=10005964"},"modified":"2022-07-22T11:37:14","modified_gmt":"2022-07-22T03:37:14","slug":"%e5%a5%bd%e7%94%a8%e5%88%b0%e7%88%86%ef%bc%81github-%e6%98%9f%e6%a0%87-32-5k%e7%9a%84%e5%91%bd%e4%bb%a4%e8%a1%8c%e8%bd%af%e4%bb%b6%e7%ae%a1%e7%90%86%e7%a5%9e%e5%99%a8%ef%bc%8c%e5%8a%9f%e8%83%bd","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10005964","title":{"rendered":"\u597d\u7528\u5230\u7206\uff01GitHub \u661f\u6807 32.5k+\u7684\u547d\u4ee4\u884c\u8f6f\u4ef6\u7ba1\u7406\u795e\u5668\uff0c\u529f\u80fd\u771f\u5fc3\u5f3a\u5927\uff01"},"content":{"rendered":"<h2>\u524d\u8a00\uff08\u5e9f\u8bdd\uff09<\/h2>\n<p>\u672c\u6765\u6253\u7b97\u5728\u516c\u53f8\u5077\u5077\u6478\u6478\u7ed9\u661f\u7403\u7684\u7528\u6237\u5199\u4e00\u7bc7\u7f16\u7a0b\u55b5\u6574\u5408 MongoDB \u7684\u6587\u7ae0\uff0c\u7ed3\u679c\u5728\u901a\u8fc7 brew \u5b89\u88c5 MongoDB \u7684\u65f6\u5019\u7adf\u7136\u62a5\u9519\u4e86\u3002\u539f\u56e0\u5f88\u7b80\u5355\uff0c\u516c\u53f8\u8fd9\u53f0 Mac \u4e0a\u7684 homebrew \u73af\u5883\u6ca1\u6709\u914d\u7f6e\u597d\u3002\u521a\u597d Java \u7a0b\u5e8f\u5458\u8fdb\u9636\u4e4b\u8def\u4e0a\u7f3a\u5c11\u8fd9\u6837\u4e00\u7bc7\u5185\u5bb9\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039356\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p>\u6240\u4ee5\u6211\u5c31\u60f3\uff0c\u4e0d\u5982\u8d81\u673a\u6c34\u4e00\u7bc7\u5427\uff0c\u554a\uff0c\u4e0d\u4e0d\u4e0d\uff0c\u8d81\u673a\u7ed9\u5c0f\u4f19\u4f34\u4eec\u666e\u53ca\u4e00\u4e0b Homebrew \u5427\uff01\u77a7\u6211\u8fd9\u8be5\u6b7b\u7684\u5927\u516c\u65e0\u79c1\u7684\u5fc3\uff08\u624b\u52a8\u72d7\u5934\uff09\u3002<\/p>\n<p>\u4e0d\u4f1a\u5427\uff1f\u4e0d\u4f1a\u8fd8\u6709\u4eba\u7528 macOS \u6ca1\u6709\u5b89\u88c5\/\u914d\u7f6e Homebrew \u5427\uff1f<\/p>\n<h2>Homebrew \u80fd\u5e72\u4ec0\u4e48<\/h2>\n<blockquote><p>Homebrew \u7684 Slogan \uff1aThe missing package manager for macOS (or Linux)<\/p><\/blockquote>\n<p>Homebrew \u8fd9\u6b3e\u547d\u4ee4\u884c\u8f6f\u4ef6\u7ba1\u7406\u795e\u5668\u5728 GitHub \u4e0a\u5df2\u7ecf\u6709 32.5k+ \u7684 star \u4e86\uff0c\u529f\u80fd\u4e5f\u771f\u5fc3\u5f3a\u5927\uff0c\u51e0\u4e4e macOS \u4e0a\u7684\u8f6f\u4ef6\u5305\u5b83\u90fd\u5305\u4e86\u3002Homebrew \u672c\u8eab\u6ca1\u6709\u95ee\u9898\uff0c\u95ee\u9898\u5728\u4e8e\u3002\u3002\u3002\u3002\u3002\u4e0d\u8bf4\u4e86\uff0c\u4f60\u61c2\u7684\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039357\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p>Homebrew \u9664\u4e86\u662f macOS \u7684\u5305\u7ba1\u7406\u5668\u4e5f\u53ef\u4ee5\u88c5\u5728 Linux \u4e0a\u6210\u4e3a Linux \u7684\u5305\u7ba1\u7406\u5668\uff0c\u4ec5\u9700\u8981\u6267\u884c\u76f8\u5e94\u7684\u547d\u4ee4\uff0c\u5c31\u80fd\u4e0b\u8f7d\u5b89\u88c5\u9700\u8981\u7684\u8f6f\u4ef6\u5305\uff0c\u7701\u53bb\u4e86\u4e0b\u8f7d\u3001\u89e3\u538b\u3001\u62d6\u62fd\u7b49\u7e41\u7410\u7684\u6b65\u9aa4\u3002<\/p>\n<p>\u7528 Homebrew \u5b98\u65b9\u7684\u8bdd\u6765\u603b\u7ed3\u5c31\u662f\uff1a\u5b89\u88c5 Apple\uff08\u6216 Linux \u7cfb\u7edf\uff09\u6ca1\u6709\u9884\u88c5\u4f46\u4f60\u9700\u8981\u7684\u8f6f\u4ef6\u3002\u6bd4\u5982\u8bf4\u5b89\u88c5 MongoDB\uff0c\u53ea\u9700\u8981\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5c31\u53ef\u4ee5\u5b89\u88c5\uff0c\u524d\u63d0\u6761\u4ef6\u662f\u73af\u5883\u4e00\u5b9a\u8981\u914d\u7f6e\u597d\u3002<\/p>\n<pre><code>brew install mongodb<\/code><\/pre>\n<p>\u7b80\u5355\u4e00\u6761\u547d\u4ee4\uff0c\u5c31\u53ef\u4ee5\u5b9e\u73b0\u5305\u7ba1\u7406\uff0c\u8fd8\u4e0d\u7528\u62c5\u5fc3\u4f9d\u8d56\/\u6587\u4ef6\u8def\u5f84\u7b49\u95ee\u9898\u3002<\/p>\n<p>Homebrew \u4e3b\u8981\u7531\u56db\u4e2a\u90e8\u5206\u7ec4\u6210: brew\u3001homebrew-core \u3001homebrew-cask\u3001homebrew-bottles\u3002<\/p>\n<ul>\n<li>brew\uff1aHomebrew \u7684\u6e90\u4ee3\u7801\u4ed3\u5e93<\/li>\n<li>homebrew-core\uff1aHomebrew \u7684\u6838\u5fc3\u6e90<\/li>\n<li>homebrew-cask\uff1a\u63d0\u4f9b macOS \u5e94\u7528\u548c\u5927\u578b\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684\u5b89\u88c5<\/li>\n<li>homebrew-bottles\uff1a\u9884\u7f16\u8bd1\u4e8c\u8fdb\u5236\u8f6f\u4ef6\u5305<\/li>\n<\/ul>\n<p>\u518d\u6765\u4e86\u89e3\u4e00\u4e0b Homebrew \u7684\u63a5\u4e2a\u6838\u5fc3\u6982\u5ff5\uff0c\u540e\u7eed\u4f1a\u7ecf\u5e38\u7528\u5230\u3002<\/p>\n<ul>\n<li>formula\uff08e\uff09\uff0c\u5b89\u88c5\u5305\u7684\u63cf\u8ff0\u6587\u4ef6\uff0c\u5e26 e \u4e3a\u590d\u6570<\/li>\n<li>cellar\uff0c\u5305\u5b89\u88c5\u597d\u540e\u6240\u5728\u7684\u76ee\u5f55<\/li>\n<li>bottle\uff0c\u9884\u5148\u7f16\u8bd1\u597d\u7684\u5305\uff0c\u4e0d\u9700\u8981\u518d\u4e0b\u8f7d\u6e90\u7801\u7f16\u8bd1\uff0c\u901f\u5ea6\u4f1a\u5feb\u5f88\u591a\uff0c\u5b98\u65b9\u5e93\u4e2d\u7684\u5305\u5927\u591a\u6570\u662f\u901a\u8fc7 bottle \u65b9\u5f0f\u5b89\u88c5\u7684<\/li>\n<li>tap\uff0c\u4e0b\u8f7d\u6e90<\/li>\n<li>cask\uff08s\uff09\uff0c\u5b89\u88c5 macOS native \u5e94\u7528\u7684\u6269\u5c55\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3a\u6709\u56fe\u5f62\u5316\u754c\u9762\u7684\u5e94\u7528\uff0c\u5e26 s \u4e3a\u590d\u6570<\/li>\n<li>bundle\uff0c\u63cf\u8ff0 Homebrew \u4f9d\u8d56\u7684\u6269\u5c55<\/li>\n<\/ul>\n<h2>\u5b89\u88c5\u914d\u7f6e Homebrew<\/h2>\n<blockquote><p>\u4e16\u4e0a\u65e0\u96be\u4e8b\uff0c\u53ea\u8981\u627e\u5230 Homebrew \u7684\u6b63\u786e\u5b89\u88c5\u65b9\u5f0f\u3002<\/p><\/blockquote>\n<p>\u6309\u7406\u8bf4\uff0cHomebrew \u7684\u5b89\u88c5\u65b9\u5f0f\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u6267\u884c\u5b98\u65b9\u7684\u4e00\u53e5\u547d\u4ee4\u5c31\u53ef\u4ee5\u5b8c\u6210\u5b89\u88c5\u4e86\u3002<\/p>\n<pre><code>\/bin\/bash -c &quot;$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/HEAD\/install.sh)&quot;<\/code><\/pre>\n<p>\u4f46\u56fd\u5185\u5f00\u53d1\u8005\u547d\u82e6\u5c31\u82e6\u5728\uff0c\u7ecf\u5e38\u4f1a\u56e0\u4e3a\u7f51\u7edc\u7684\u539f\u56e0\u5b89\u88c5\u5931\u8d25\u3002\u539f\u56e0\u6211\u53ea\u80fd\u8bf4\u8fd9\u662f <code>https:\/\/raw.githubusercontent.com<\/code> \u7f51\u7ad9\u7684\u9505\uff0c\u8c01\u8ba9\u5b83\u8bbf\u95ee\u4e0d\u7a33\u5b9a\u5462\uff1f<\/p>\n<p>\u600e\u4e48\u529e\u5462\uff1f<\/p>\n<p>\u5fc5\u987b\u6362\u4e00\u79cd\u9ad8\u6548\u4e14\u79d1\u5b66\u7684\u5b89\u88c5\u65b9\u5f0f\uff0c\u90a3\u5c31\u662f\u4f7f\u7528\u955c\u50cf\u5b89\u88c5\u3002 Gitee \u4e0a\u6709\u5f00\u6e90\u4f5c\u8005\u63d0\u4f9b\u4e86\u4e00\u952e\u5b89\u88c5\u5305\uff0c\u53ea\u9700\u8981\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<pre><code>\/bin\/zsh -c &quot;$(curl -fsSL https:\/\/gitee.com\/cunkai\/HomebrewCN\/raw\/master\/Homebrew.sh)&quot;<\/code><\/pre>\n<p>\u5b89\u88c5\u811a\u672c\u91cc\u63d0\u4f9b\u4e86\u4e2d\u79d1\u5927\u3001\u6e05\u534e\u5927\u5b66\u3001\u5317\u4eac\u5916\u56fd\u8bed\u5927\u5b66\u3001\u817e\u8baf\u3001\u963f\u91cc\u5df4\u5df4\u7b49\u4e0b\u8f7d\u6e90\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039358\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p>\u4f46\u8fc7\u6765\u4eba\u544a\u8bc9\u4f60\uff0c\u522b\u9009\u5176\u4ed6\u955c\u50cf\u6e90\uff0c\u5c31\u9009\u4e2d\u79d1\u5927\uff0c\u901f\u5ea6\u6760\u6760\u7684\uff0c40-50M\/s\uff0c\u8fd9\u901f\u5ea6\u6bd4\u5176\u4ed6\u955c\u50cf\u6e90\u5feb\u591a\u4e86\uff0c\u5bf9\u6bd4\u8d77\u6765\uff0c\u5176\u4ed6\u5c31\u662f\u8717\u725b\ud83d\udc0c\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039359\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p>\u8fd9\u4e2a\u5b89\u88c5\u811a\u672c\u975e\u5e38\u7684\u667a\u80fd\uff0c\u51e0\u4e4e\u53ef\u4ee5\u4e00\u4ef6\u5e2e\u6211\u4eec\u641e\u5b9a\u6240\u6709\u95ee\u9898\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039360\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p>\u518d\u6b21\u611f\u8c22 Gitee \u4e0a\u8fd9\u4f4d\u5927\u725b\uff0c\u5df2\u7ecf 3k star \u4e86\uff0c\u6211\u628a\u5730\u5740\u8d34\u51fa\u6765\uff1a<\/p>\n<blockquote><p><a href=\"https:\/\/link.segmentfault.com\/?enc=eDOCs7lAHwi1BvXL%2BJVbAA%3D%3D.9634M86lH67orQ7z7q3KTqIv2uyTqShOUTSusSNg%2Bh7BQc8Tlu5iXsM8Khfef168\" rel=\"nofollow\">https:\/\/gitee.com\/cunkai\/HomebrewCN<\/a><\/p><\/blockquote>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039361\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p>brew \u672c\u4f53\u5b89\u88c5\u6210\u529f\u540e\uff0c\u4f1a\u63d0\u793a\u6211\u4eec\u914d\u7f6e\u56fd\u5185\u955c\u50cf\u6e90\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039362\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p>nice\uff0c\u5b89\u88c5\u5b8c\u6210\u4e86\u3002\u6267\u884c\u4e0b\u9762\u8fd9\u51e0\u4e2a\u547d\u4ee4\u4f53\u9a8c\u4e0b\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039363\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<ul>\n<li><code>brew ls<\/code> \u67e5\u770b\u672c\u5730\u547d\u4ee4\uff1b<\/li>\n<li><code>brew search mongodb<\/code> \u67e5\u627e\u8f6f\u4ef6\uff1b<\/li>\n<li><code>brew -v<\/code> \u67e5\u770b\u7248\u672c\uff1b<\/li>\n<li><code>brew update<\/code> \u66f4\u65b0\u7248\u672c\uff1b<\/li>\n<li><code>brew install --cask firefox<\/code> \u5b89\u88c5\u56fe\u5f62\u5316\u754c\u9762\u8f6f\u4ef6<\/li>\n<li><code>brew config<\/code> \u67e5\u770b\u914d\u7f6e\u3002<\/li>\n<\/ul>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039364\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<h2>brew \u548c brew cask \u7684\u533a\u522b<\/h2>\n<p>\u8fd9\u91cc\u987a\u5e26\u8bf4\u4e00\u4e0b brew \u548c brew cask \u7684\u533a\u522b\uff0c\u8fd9\u4e5f\u662f\u4e00\u5f00\u59cb\u6211\u4f7f\u7528 brew \u65f6\u56f0\u60d1\u7684\u4e00\u4e2a\u70b9\u3002<\/p>\n<p>\u4ee5\u524d\u7684\u7248\u672c\u4e2d\uff0c\u662f\u53ef\u4ee5\u76f4\u63a5 <code>brew cask list<\/code> \u8fd9\u6837\u6267\u884c\u547d\u4ee4\u7684\uff0c\u73b0\u5728\u6539\u6210\u4e86 <code>brew list --cask<\/code>\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039365\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p>brew \u662f\u4ece\u4e0b\u8f7d\u6e90\u7801\u5f00\u59cb\uff0c\u7136\u540e\u7f16\u8bd1\uff08\u4e0d\u4e00\u5b9a\uff0c\u6709\u4e9b\u6709\u73b0\u6210\u7684 bottle\uff09\u89e3\u538b\uff0c\u901a\u8fc7 <code>.\/configure &amp;&amp; make install<\/code> \u8fdb\u884c\u5b89\u88c5\uff0c\u540c\u65f6\u4f1a\u5305\u542b\u76f8\u5173\u7684\u4f9d\u8d56\u5e93\u3002\u73af\u5883\u53d8\u91cf\u4e5f\u662f\u81ea\u52a8\u914d\u7f6e\u7684\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039366\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p>brew cask \u662f\u4e0b\u8f7d\u89e3\u538b\u5df2\u7ecf\u7f16\u8bd1\u597d\u4e86\u7684\u8f6f\u4ef6\u5305\uff08.dmg\/.pkg\uff09\uff0c\u653e\u5728\u7edf\u4e00\u7684\u76ee\u5f55\u4e2d\uff0c\u7701\u53bb\u4e86\u624b\u52a8\u53bb\u4e0b\u8f7d\u3001\u89e3\u538b\u3001\u62d6\u62fd\u7b49\u86cb\u75bc\u6b65\u9aa4\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039367\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p>\u901a\u8fc7 <code>brew search google<\/code> \u6211\u4eec\u4e5f\u53ef\u4ee5\u770b\u5f97\u51fa\u4e24\u8005\u4e4b\u95f4\u7684\u533a\u522b\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039368\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<ul>\n<li>\u300cFormulae\u300d\u4e00\u822c\u662f\u90a3\u4e9b\u547d\u4ee4\u884c\u5de5\u5177\u3001\u5f00\u53d1\u5e93\u3001\u5b57\u4f53\u3001\u63d2\u4ef6\u7b49\u4e0d\u542b GUI \u754c\u9762\u7684\u8f6f\u4ef6\u3002<\/li>\n<li>\u300cCask\u300d\u5c31\u4f1a\u5305\u542b\u4e00\u4e9b GUI \u56fe\u5f62\u5316\u754c\u9762\u7684\u8f6f\u4ef6\uff0c\u5982 Google Chrome\u3001FireFox \u3001Atom \u7b49<\/li>\n<\/ul>\n<h2>\u4f7f\u7528 Homebrew<\/h2>\n<p>Homebrew\u5b89\u88c5\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u6211\u4eec\u6765\u5b9e\u64cd\u4f53\u9a8c\u4e24\u628a\u3002<\/p>\n<p>\u8fd9\u91cc\u662f homebrew \u5e38\u7528\u547d\u4ee4\u7684\u4e00\u4e2a\u6e05\u5355\uff0c\u53ef\u4f9b\u53c2\u8003\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u547d\u4ee4<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>brew update<\/td>\n<td>\u66f4\u65b0 Homebrew<\/td>\n<\/tr>\n<tr>\n<td>brew search package<\/td>\n<td>\u641c\u7d22\u8f6f\u4ef6\u5305<\/td>\n<\/tr>\n<tr>\n<td>brew install package<\/td>\n<td>\u5b89\u88c5\u8f6f\u4ef6\u5305<\/td>\n<\/tr>\n<tr>\n<td>brew uninstall package<\/td>\n<td>\u5378\u8f7d\u8f6f\u4ef6\u5305<\/td>\n<\/tr>\n<tr>\n<td>brew upgrade<\/td>\n<td>\u5347\u7ea7\u6240\u6709\u8f6f\u4ef6\u5305<\/td>\n<\/tr>\n<tr>\n<td>brew upgrade package<\/td>\n<td>\u5347\u7ea7\u6307\u5b9a\u8f6f\u4ef6\u5305<\/td>\n<\/tr>\n<tr>\n<td>brew list<\/td>\n<td>\u5217\u51fa\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\u5217\u8868<\/td>\n<\/tr>\n<tr>\n<td>brew services command package<\/td>\n<td>\u7ba1\u7406 brew \u5b89\u88c5\u8f6f\u4ef6\u5305<\/td>\n<\/tr>\n<tr>\n<td>brew services list<\/td>\n<td>\u5217\u51fa brew \u7ba1\u7406\u8fd0\u884c\u7684\u670d\u52a1<\/td>\n<\/tr>\n<tr>\n<td>brew info package<\/td>\n<td>\u67e5\u770b\u8f6f\u4ef6\u5305\u4fe1\u606f<\/td>\n<\/tr>\n<tr>\n<td>brew deps package<\/td>\n<td>\u5217\u51fa\u8f6f\u4ef6\u5305\u7684\u4f9d\u8d56\u5173\u7cfb<\/td>\n<\/tr>\n<tr>\n<td>brew help<\/td>\n<td>\u67e5\u770b\u5e2e\u52a9<\/td>\n<\/tr>\n<tr>\n<td>brew cleanup<\/td>\n<td>\u6e05\u9664\u8fc7\u65f6\u8f6f\u4ef6\u5305<\/td>\n<\/tr>\n<tr>\n<td>brew link package<\/td>\n<td>\u521b\u5efa\u8f6f\u4ef6\u5305\u7b26\u53f7\u94fe\u63a5<\/td>\n<\/tr>\n<tr>\n<td>brew unlink package<\/td>\n<td>\u53d6\u6d88\u8f6f\u4ef6\u5305\u7b26\u53f7\u94fe\u63a5<\/td>\n<\/tr>\n<tr>\n<td>brew doctor<\/td>\n<td>\u68c0\u67e5\u7cfb\u7edf\u662f\u5426\u5b58\u5728\u95ee\u9898<\/td>\n<\/tr>\n<tr>\n<td>brew tap [user\/repo]<\/td>\n<td>\u5c06\u5f00\u6e90\u4ed3\u5e93\u6dfb\u52a0\u5230\u6e90<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u7b2c\u4e00\u628a\uff0c\u4f7f\u7528 Homebrew \u5b89\u88c5 JDK<\/h3>\n<p>\u4f5c\u4e3a\u4e00\u540d Java \u540e\u7aef\u7a0b\u5e8f\u5458\uff0cJDK \u662f\u5fc5\u987b\u8981\u5b89\u88c5\u7684\uff0c\u5bf9\u5427\uff1f<\/p>\n<p>1\uff09\u6267\u884c <code>brew search jdk<\/code> \u67e5\u627e\u6709\u54ea\u4e9b\u53ef\u4f9b\u5b89\u88c5\u7684 JDK<\/p>\n<p>2\uff09\u6267\u884c <code>brew install openjdk@17<\/code> \u5b89\u88c5 JDK\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039369\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p>3\uff09\u4f46\u6211\u4eec\u5728 macOS \u4e0a\u5b89\u88c5\u4e86\u591a\u4e2a\u7248\u672c\u7684 JDK \u540e\uff0c\u600e\u4e48\u7ba1\u7406\u5b83\u4eec\u5462\uff1f\u53ef\u4ee5\u5b89\u88c5\u4e00\u4e0b jEnv\uff0c\u4e00\u4e2a\u5e2e\u52a9\u6211\u4eec\u7ba1\u7406 JAVA_HOME \u7684\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u5728 GitHub \u4e0a\u5df2\u7ecf\u6536\u83b7 4.3k \u7684 star\u3002<\/p>\n<blockquote><p>GitHub \u5730\u5740\uff1a<a href=\"https:\/\/link.segmentfault.com\/?enc=2UDFfoCaiRGns9bK%2BhnZSQ%3D%3D.spOlyk6rezSR2jHb%2Fv8pPgU48RBI%2F8Lku7xD%2FNduJJA%3D\" rel=\"nofollow\">https:\/\/github.com\/jenv\/jenv<\/a><\/p><\/blockquote>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039370\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p>\u5b98\u65b9\u6587\u6863\u4e5f\u975e\u5e38\u7684\u7b80\u6d01\u5927\u65b9\uff1a<\/p>\n<blockquote><p><a href=\"https:\/\/link.segmentfault.com\/?enc=131XTMf8%2FirZ819ynppDrw%3D%3D.Q3axzfK5ojw8JwdTvsUzow7pT4buAitp1dZU22qa2Kg%3D\" rel=\"nofollow\">https:\/\/www.jenv.be\/<\/a><\/p><\/blockquote>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039371\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p>\u5b89\u88c5\uff1a<\/p>\n<pre><code>brew install jenv<\/code><\/pre>\n<p>\u914d\u7f6e\uff1a<\/p>\n<pre><code>echo 'export PATH=&quot;$HOME\/.jenv\/bin:$PATH&quot;' &gt;&gt; ~\/.zshrc\necho 'eval &quot;$(jenv init -)&quot;' &gt;&gt; ~\/.zshrc<\/code><\/pre>\n<p>\u6dfb\u52a0\uff1a<\/p>\n<pre><code>jenv add \/usr\/local\/opt\/openjdk@17\/libexec\/openjdk.jdk\/Contents\/Home\/<\/code><\/pre>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039372\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p>JDK \u7684\u5b89\u88c5\u8def\u5f84\u53ef\u4ee5\u901a\u8fc7\u4e0b\u56fe\u7684\u4f4d\u7f6e\u67e5\u627e\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039373\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p>\u7ba1\u7406\uff1a<\/p>\n<pre><code>jenv versions\njenv global 17.0.3<\/code><\/pre>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039374\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p>\u662f\u4e0d\u662f\u8d3c\u65b9\u4fbf\uff1f\u518d\u4e5f\u4e0d\u7528\u6574\u8fd9 <code>echo 'export PATH=&quot;\/usr\/local\/opt\/openjdk@17\/bin:$PATH&quot;' &gt;&gt; ~\/.zshrc<\/code> \u73a9\u610f\u4e86\uff01\u723d\uff0c\u5b9e\u5728\u662f\u723d\uff01<\/p>\n<h3>\u7b2c\u4e8c\u628a\uff0c\u4f7f\u7528 Homebrew \u5b89\u88c5 MongoDB<\/h3>\n<p>\u5148\u770b MongoDB \u7684\u5b98\u65b9\u6587\u6863\uff08\u5f53\u524d release \u7248\u672c\u662f 5.0\uff0c\u6211\u8fd9\u91cc\u5c31\u5148\u7528\u4e0a\u4e00\u4e2a\u7a33\u5b9a\u7248 4.4\uff09\uff1a<\/p>\n<blockquote><p><a href=\"https:\/\/link.segmentfault.com\/?enc=wG5YhXQY5tMT1E%2FLO4fCxg%3D%3D.18fwoMz2GVJ%2BteZz6p8w3mBzkMdXHxEDi%2FUyB%2FxvfU9QoVvGEtHqAEGFX9uUFHV8j4vnlwjWEODbjLhj1SKr8v%2FH87W4Iy22rWOUmcHhXNo%3D\" rel=\"nofollow\">https:\/\/www.mongodb.com\/docs\/v4.4\/tutorial\/install-mongodb-on-os-x\/<\/a><\/p><\/blockquote>\n<p>1\uff09\u62c9\u53d6 MongoDB \u7684\u6e90<\/p>\n<pre><code>brew tap mongodb\/brew<\/code><\/pre>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039375\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p>2\uff09\u66f4\u65b0 brew<\/p>\n<pre><code>brew update<\/code><\/pre>\n<p>3\uff09\u5b89\u88c5 MongoDB<\/p>\n<pre><code>brew install mongodb-community@4.4<\/code><\/pre>\n<p>OK\uff0c\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039376\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<h2>\u5c0f\u7ed3<\/h2>\n<p>\u901a\u8fc7 Homebrew \u4e0b\u8f7d\u7684\u8f6f\u4ef6\u57fa\u672c\u4e0a\u6765\u81ea\u4e8e\u5b98\u7f51\uff0c\u6240\u4ee5\u5927\u53ef\u4ee5\u653e\u5fc3\u3002\u800c\u4e14\u800c\u4e14\u5b83\u5c3d\u53ef\u80fd\u5730\u5229\u7528\u4e86\u7cfb\u7edf\u81ea\u5e26\u7684\u5404\u79cd\u5e93\uff0c\u4f7f\u5f97\u8f6f\u4ef6\u5305\u7684\u7f16\u8bd1\u65f6\u95f4\u5927\u5927\u7f29\u77ed\uff0c\u57fa\u672c\u4e0a\u4e0d\u4f1a\u9020\u6210\u5197\u4f59\u3002<\/p>\n<p>\u8fd9\u91cc\u987a\u5e26\u7ed9\u5927\u5bb6\u63d0\u4e00\u5219\u5c0f\u6545\u4e8b\uff0c\u6559\u522b\u4eba\u5b66\u7b97\u6cd5\u7684\u5927\u4f6c\u53ef\u4ee5\u62ff\u8d70\u4e86\uff1ahomebrew \u7684\u4f5c\u8005\u53bb\u9762 Google\uff0c\u88ab\u8003\u7b97\u6cd5\u9898: \u53cd\u8f6c\u4e8c\u53c9\u6811\uff0c\u7ed3\u679c\u6ca1\u901a\u8fc7\u88ab\u62d2\u4e86\uff0c\ud83d\ude06<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039377\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p>\u597d\u4e86\u597d\u4e86\uff0c\u4eca\u5929\u8fd9\u7bc7\u6587\u7ae0\u5c31\u5148\u6c34\u5230\u8fd9\u5427\uff0c\u6211\u4eec\u4e0b\u671f\u89c1~<\/p>\n<hr>\n<p><em>\u6ca1\u6709\u4ec0\u4e48\u4f7f\u6211\u505c\u7559\u2014\u2014\u9664\u4e86\u76ee\u7684\uff0c\u7eb5\u7136\u5cb8\u65c1\u6709\u73ab\u7470\u3001\u6709\u7eff\u836b\u3001\u6709\u5b81\u9759\u7684\u6e2f\u6e7e\uff0c\u6211\u662f\u4e0d\u7cfb\u4e4b\u821f<\/em>\u3002<\/p>\n<p><strong>\u672c\u6587\u5df2\u6536\u5f55\u5230 GitHub \u4e0a\u661f\u6807 2.8k+ \u7684\u5f00\u6e90\u4e13\u680f\u300aJava \u7a0b\u5e8f\u5458\u8fdb\u9636\u4e4b\u8def\u300b\uff0c\u636e\u8bf4\u6bcf\u4e00\u4e2a\u4f18\u79c0\u7684 Java \u7a0b\u5e8f\u5458\u90fd\u559c\u6b22\u5979\uff0c\u98ce\u8da3\u5e7d\u9ed8\u3001\u901a\u4fd7\u6613\u61c2\u3002\u5185\u5bb9\u5305\u62ec Java \u57fa\u7840\u3001Java \u5e76\u53d1\u7f16\u7a0b\u3001Java \u865a\u62df\u673a\u3001Java \u4f01\u4e1a\u7ea7\u5f00\u53d1\uff08Git\u3001Nginx\u3001Maven\u3001Intellij IDEA\u3001Spring\u3001Spring Boot\u3001Redis\u3001MySql \u7b49\u7b49\uff09\u3001Java \u9762\u8bd5\u7b49\u6838\u5fc3\u77e5\u8bc6\u70b9\u3002\u5b66 Java\uff0c\u5c31\u8ba4\u51c6 Java \u7a0b\u5e8f\u5458\u8fdb\u9636\u4e4b\u8def<\/strong>\ud83d\ude04\u3002<\/p>\n<p><a href=\"https:\/\/link.segmentfault.com\/?enc=ST%2BZ716IKIcWd7aJUjolUw%3D%3D.8lUQehIRJlbMlBuYovng1OM2Jjp0VFuWjd8Nq91tsi1H4zl4LNcA3ZOmGDWexZjL\" rel=\"nofollow\">https:\/\/github.com\/itwanger\/toBeBetterJavaer<\/a><\/p>\n<p>star \u4e86\u8fd9\u4e2a\u4ed3\u5e93\u5c31\u7b49\u4e8e\u4f60\u62e5\u6709\u4e86\u6210\u4e3a\u4e86\u4e00\u540d\u4f18\u79c0 Java \u5de5\u7a0b\u5e08\u7684\u6f5c\u529b\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042039378\" alt=\"\" title=\"\" loading=\"lazy\" ><\/p>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000042039354\">https:\/\/segmentfault.com\/a\/1190000042039354<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00\uff08\u5e9f\u8bdd\uff09 \u672c\u6765\u6253\u7b97\u5728\u516c\u53f8\u5077\u5077\u6478\u6478\u7ed9\u661f\u7403\u7684\u7528\u6237\u5199\u4e00\u7bc7\u7f16\u7a0b\u55b5\u6574\u5408 MongoDB \u7684\u6587\u7ae0\uff0c\u7ed3\u679c\u5728\u901a\u8fc7 brew [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-10005964","post","type-post","status-publish","format-standard","hentry"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10005964","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10005964"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10005964\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10005964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10005964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10005964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}