3.Ubuntu Installing MongoDB Enterprise Edition
① importing the public key by installing the package management system
sudo apt-key adv--keyserver hkp://keyserver.ubuntu.com:80--recv 0c49f3730359a14518585931bc711f9ba15703c6
② Creating a/etc/apt/sources.list.d/mongodb-enterprise.list file
echo "Deb [ARCH=AMD64] http://repo.mongodb.com/apt/ubuntu precise/mongodb-enterprise/3.4 Multiverse" | sudo tee/etc/apt/sources.list.d/mongodb-enterprise.list
echo "Deb [ARCH=AMD64] http://repo.mongodb.com/apt/ubuntu trusty/mongodb-enterprise/3.4 Multiverse" | sudo tee/etc/apt/sources.list.d/mongodb-enterprise.list
echo "Deb [arch=amd64,arm64,ppc64el,s390x] Http://repo.mongodb.com/apt/ubuntu xenial/mongodb-enterprise/3.4 Multiverse "| sudo tee/etc/apt/sources.list.d/mongodb-enterprise.list
If you want to install the specified version, modify the profile name plus the version number, and install the MongoDB Enterprise version 2.6:
echo "Deb Http://repo.mongodb.com/apt/ubuntu" $ (LSB_RELEASE-SC) "/mongodb-enterprise/2.6 Multiverse" | sudo tee/etc/apt/sources.list.d/mongodb-enterprise-2.6.list
MongoDB offers 64-bit long-term maintenance version (LTS) Ubuntu packages. For example: 12.04 LTS, 14.04LTS, 16.04LTS. These packages may also work in other versions of Ubuntu, but do not provide help.
③ updating the Local installation library
sudo apt-get update
④ Installing MongoDB Enterprise Edition
Install the latest stable version of MongoDB Enterprise Edition
sudo apt-get install-y mongodb-enterprise
⑤ Open MongoDB
sudo service Mongod start
⑥ Close MongoDB
sudo service Mongod stop
⑦ to restart MongoDB
sudo service mongod restart
⑧ Uninstalling MongoDB
Uninstalling MongoDB requires removing the program, deleting the configuration file, deleting the data and log.
Completely delete MongoDB
The following steps will completely remove MongoDB and configuration and all databases. This process cannot be restored, so make sure that all the data is backed up before you start.
1. Stop MongoDB
sudo service Mongod stop
2. Remove the installer
sudo apt-get purge mongodb-enterprise*
3. Delete Data directory and log
sudo rm-r/var/log/mongodbsudo rm-r/var/lib/mongodb
⑨ Reference Articles
Official articles
Official articles
The latest content will be updated at the source station. Reprint please keep the original link: http://dashidan.com/article/mongodb/index.html
This article is from the "13402341" blog, please be sure to keep this source http://13412341.blog.51cto.com/13402341/1976396
3.Ubuntu Installing MongoDB Enterprise Edition