【问题标题】:Can not run mongo command in terminal无法在终端中运行 mongo 命令
【发布时间】:2013-09-18 19:56:27
【问题描述】:

我在 certian 目录中安装了带有 .tar 的 mongoDB,如果我使用,我只能在该目录中运行 mongo

./mongo

否则,如果我尝试只使用

mongo

终端会告诉我它没有安装。我该怎么办?

【问题讨论】:

标签: mongodb shell terminal command installation


【解决方案1】:

尝试,将以下行添加到 .bashrc

alias mongod='path_to_mongodb/bin/mongod'
alias mongo='path_to_mongodb/bin/mongo'

【讨论】:

  • 我添加了别名,但现在它说显然没有文件。
猜你喜欢
  • 2016-08-24
  • 1970-01-01
  • 1970-01-01
  • 2022-01-22
  • 2021-06-30
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-02-06
相关资源
最近更新 更多