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

How to install mongodb in ahjesus

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

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.

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: 229

*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

Servers

Wechat

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

12
Report