Homebrew&Mongod

Homebrew官網:http://brew.shgit

Homebrew installs the stuff you need that Apple didn'tgithub

Homebrew的安裝很是簡單,打開終端複製、粘貼如下命令。mongodb

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2.若是你當前的環境變量尚未加入 mongod ,手動添加的環境變量中.shell

$ nano ~/.bash_profileruby

//添加mongodb安裝目錄到環境變量中bash

export PATH=/usr/local/Cellar/mongodb/3.4.0/bin/:$PATHcurl

 

3.若是讓環境變量立刻生效? 執行下面的url

shell source ~/.bash_profilecode

相關文章
相關標籤/搜索
本站公眾號
   歡迎關注本站公眾號,獲取更多信息