如何删除旧版本的mongodb并在cloud9 IDE中安装新版本? [英] How to delete an old version of mongodb and install the new one in cloud9 IDE?

查看:82
本文介绍了如何删除旧版本的mongodb并在cloud9 IDE中安装新版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用cloud9 IDE,并且试图通过mongo shell连接到在mongolab上运行的mongodb实例. Mongolab现在运行mongodb 3.0版,但是cloud9安装了2.6版.

I'm using the cloud9 IDE and I'm trying to connect through the mongo shell to a mongodb instance running on mongolab. Mongolab now runs mongodb version 3.0 but cloud9 has version 2.6 installed.

我尝试按照mongodb网站上的说明使用mongodb二进制文件在ubuntu 14.04上进行安装,尽管它指示我使用的所有命令都已正确执行,但我不知道发生了什么,当我用mongod --version检查mongodb版本时,它仍然说我正在运行旧版本-2.6.10

I've tried following the instructions on the mongodb website for installing on ubuntu 14.04 using the mongodb binaries, and although all of the commands it instructed me to use were executed without errors, I didn't understand exactly what was happening, and when I checked the mongodb version with mongod --version it still said I was running the old version - 2.6.10

有人可以解释在cloud9中卸载旧版本并安装新版本的mongodb的步骤吗?

Can someone explain the steps to uninstall the old version and install the new version of mongodb in cloud9?

推荐答案

您要做的第一件事是删除现有的mongodb:

The first thing you have to do is to remove the existing mongodb:

sudo apt-get remove mongodb* --purge

然后,我们可以按照 MongoDB文档.

  1. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
  2. echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
  3. sudo apt-get update
  4. sudo apt-get install -y mongodb-org
  1. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
  2. echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
  3. sudo apt-get update
  4. sudo apt-get install -y mongodb-org

我希望这会有所帮助.

这篇关于如何删除旧版本的mongodb并在cloud9 IDE中安装新版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆