Ubuntu Apt-get Installing MongoDB

Source: Internet
Author: User
Tags install mongodb mongodb
Reprinted from Http://www.cnlamp.org/linux/417.html
Posted 2 years ago ⁄linux⁄ No Comments
Since the version of MongoDB in the official Ubuntu apt source is older, it is installed with the APT source provided by MongoDB. To use the software on a third-party source, in addition to adding the corresponding source on the sources.list, you have to add the corresponding public key key to properly install the software.

add MongoDB's public key to local key database via Apt-key

sudo apt-key adv--keyserver keyserver.ubuntu.com--recv 7f0ceb10


Add a software source officially provides two software sources, one is the SYSV-style startup script, and the other is the upstart-style startup script. I use the SYSV style here, the current working principle of upstart is not familiar.

Here I give the two styles of software source, please adjust according to the actual situation.

#SysV style
Deb Http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen
#Upstart
Deb Http://downloads-distro.mongodb.org/repo/ubuntu-upstart Dist 10gen



edit/etc/apt/sources.list, add MongoDB software source vi/etc/apt/sources.list
#增加下面的软件源
Strong>deb http://downloads-distro.mongodb.org/repo/debian-sysvinit Dist 10gen

installation mongodb< /strong> #更新本地软件包列表信息
apt-get update
#安装MongoDB
apt-get Install mongodb-10gen

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.