Get the App
SLTechnology News&Howtos  ›  Database  › 

3.Ubuntu installs MongoDB Enterprise Edition

Shulou Source: shulou.com Published: 2022-06-01 22:11:18 10月04日 Update

3.Ubuntu installs MongoDB Enterprise Edition

The latest content will be updated at the origin server. To reprint, please keep the original link: http://dashidan.com/article/mongodb/index.html

① imports the public key by installing the package management system

Sudo apt-key adv-keyserver hkp://keyserver.ubuntu.com:80-recv 0C49F3730359A14518585931BC711F9BA15703C6

② create / etc/apt/sources.list.d/mongodb-enterprise.list file

Ubuntu 12.04

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

Ubuntu 14.04

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

Ubuntu 16.04

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, change the configuration file name and add the version number. For example, install 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.listmongoDB provides 64-bit long-term maintenance version (LTS) ubuntu package. For example: 12.04 LTS, 14.04LTS, 16.04LTS. These packages may also work in other ubuntu versions, but do not provide help.

③ updates the local installation library

Sudo apt-get update

④ installs mongodb Enterprise Edition

Install the latest stable version of mongodb Enterprise Edition

Sudo apt-get install-y mongodb-enterprise

⑤ enables mongodb

Sudo service mongod start

⑥ shuts down mongodb

Sudo service mongod stop

⑦ restart mongodb

Sudo service mongod restart

⑧ Uninstall mongodb

Uninstalling mongodb requires removing programs, deleting configuration files, deleting data and log.

Completely delete MongoDB

The following steps will completely delete MongoDB and the configuration and all databases. This process cannot be restored, so make sure all the data is backed up before you start.

1. Stop mongodbsudo service mongod stop2. Delete the installer sudo apt-get purge mongodb-enterprise*3. Delete the data directory and logsudo rm-r / var/log/mongodbsudo rm-r / var/lib/mongodb

⑨ reference articles

Official website article

Official website article

Tags: Enterprise data version file article configuration program update public key content original text backup database file name step management system directory process link reference Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Shulou Information Microsoft Shulou Tech Info macOS