Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

3.Ubuntu installs MongoDB Enterprise Edition

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report