最近在学习mongo,记录下学习过程

首先,https://www.mongodb.com/download-center#community 官网下载 解压到自己喜欢的文件目录下。

接着 打开配置文件

   第一种方式终端 vim ~/.bash_profile 打开配置文件

  第二种显示隐藏文件  defaults write com.apple.finder AppleShowAllFiles -bool true   找到 .bash_profile

  在export PATH 中加入自己的mongo下的bin路径 ,例如我的export PATH= $JAVA_HOME/bin:/Users/xxxx/mongodb/bin:$PATH

 保存修改 source ~/.bash_profile  第二种方式的话直接Ctr+s保存。

执行mongo  

 

posted on 2017-04-18 21:08  leonel  阅读(941)  评论(0编辑  收藏  举报