MongoDB是一个高性能的NoSQL数据库,相比于关系型数据库,它同时具备高性能与高灵活性,这里讲解一下如何在Ubuntu 16.04 LTS上安装与配置MongoDB数据库。
添加软件源linuxidc@linuxidc.com ~/ $ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
[sudo] password for linuxidc:
Executing: /tmp/tmp.AasdNL9T70/gpg.1.sh --keyserver
hkp://keyserver.ubuntu.com:80
--recv
EA312927
gpg: requesting key EA312927 from hkp server keyserver.ubuntu.com
gpg: key EA312927: public key "MongoDB 3.2 Release Signing Key <packaging@mongodb.com>" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
linuxidc@linuxidc.com ~ $
linuxidc@qwfys ~ $ echo "deb xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
deb xenial/mongodb-org/3.2 multiverse
linuxidc@linuxidc.com ~ $ apt update
Hit:1 :10006/ubuntukylin xenial InRelease
Ign:2 sylvia InRelease
Hit:3 xenial InRelease
Hit:4 xenial-updates InRelease
Hit:5 xenial-backports InRelease
Hit:6 sylvia Release
Ign:8 xenial/mongodb-org/3.2 InRelease
Hit:9 xenial InRelease
Get:10 xenial/mongodb-org/3.2 Release [3,462 B]
Get:11 xenial-security InRelease [102 kB]
Hit:12 xenial InRelease
Get:13 xenial/mongodb-org/3.2 Release.gpg [801 B]
Get:14 xenial/mongodb-org/3.2/multiverse amd64 Packages [8,905 B]
Fetched 115 kB in 3s (35.2 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
linuxidc@linuxidc.com ~ $ apt list |grep mongo
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.