Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to install mongodb in ahjesus

Shulou Source: shulou.com Published: 2022-06-01 17:47:58 11月17日 Update

This article will explain in detail how to install mongodb in ahjesus, the content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.

Import common key

The code is as follows:

Sudo apt-key adv-keyserver hkp://keyserver.ubuntu.com:80-recv 7F0CEB10

Create a source list

The code is as follows:

Echo 'deb https://repo.mongodb.com/apt/ubuntu precise/mongodb-enterprise/stable multiverse' | sudo tee / etc/apt/sources.list.d/mongodb-enterprise.list

Refresh package

The code is as follows:

Sudo apt-get update

Install Enterprise Edition

The code is as follows:

Sudo apt-get install mongodb-enterprise

To prevent accidental upgrades to the latest version, you can run the following command

The code is as follows:

Echo "mongodb-enterprise hold" | sudo dpkg-- set-selections

Echo "mongodb-enterprise-server hold" | sudo dpkg-- set-selections

Echo "mongodb-enterprise-shell hold" | sudo dpkg-- set-selections

Echo "mongodb-enterprise-mongos hold" | sudo dpkg-- set-selections

Echo "mongodb-enterprise-tools hold" | sudo dpkg-- set-selections

Start up and run

The code is as follows:

Sudo / etc/init.d/mongod start

Verify that the startup is successful

Verify that the startup is successful and you can view it in the log file, which is located in / var/log/mongodb/mongod.log.

Stop it

The code is as follows:

Sudo / etc/init.d/mongod stop

Restart

The code is as follows:

Sudo / etc/init.d/mongod restart

Attachment: update failure hint has a solution to the old item

Update source to domestic

I use the source of Aliyun.

The specific action is that vi / etc/apt/sources.list adds the following entry (!) to the front of the file. Please make the corresponding backup before operation!)

The code is as follows:

Deb http://mirrors.aliyun.com/ubuntu/ precise main restricted universe multiverse

Deb http://mirrors.aliyun.com/ubuntu/ precise-security main restricted universe multiverse

Deb http://mirrors.aliyun.com/ubuntu/ precise-updates main restricted universe multiverse

Deb http://mirrors.aliyun.com/ubuntu/ precise-proposed main restricted universe multiverse

Deb http://mirrors.aliyun.com/ubuntu/ precise-backports main restricted universe multiverse

Deb-src http://mirrors.aliyun.com/ubuntu/ precise main restricted universe multiverse

Deb-src http://mirrors.aliyun.com/ubuntu/ precise-security main restricted universe multiverse

Deb-src http://mirrors.aliyun.com/ubuntu/ precise-updates main restricted universe multiverse

Deb-src http://mirrors.aliyun.com/ubuntu/ precise-proposed main restricted universe multiverse

Deb-src http://mirrors.aliyun.com/ubuntu/ precise-backports main restricted universe multiverse

On how to install mongodb in ahjesus to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Code success content files articles more knowledge articles run verify good accident enterprise location method command backup log latest version entry Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Shulou Technology NVidia Huawei Apple