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

Centos 7 Ultra simple yum Source installation MongoDB

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

= configure yum source warehouse =

Enter the yum warehouse and generate the source of the mongodb

[root@localhost network-scripts] # cd / etc/yum.repos.d/

[root@localhost yum.repos.d] # vim mongodb-org.repo

# insert the following configuration information:

[mongodb-org]

Name=MongoDB Repository

Baseurl= https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.6/x86_64/

Gpgcheck=1

Enabled=1

Gpgkey= https://www.mongodb.org/static/pgp/server-3.6.asc

Detailed explanation:

Name # name

Baseurl # get the download path

Gpkcheck=1 # means to verify the rpm package downloaded from this source

Enable=1 # means to enable this source.

Gpgkey # gpg Authentication

# Save and exit after modification

Yum list # reload the yum source

= install MongoDB=

1. Download and install mongodb

Yum install mongodb-org-y

two。 Set up the configuration file for MongoDB

Vim / etc/mongod.conf

# modify configuration

BindIp:0.0.0.0 # snooping address

Port:27017 # listening port

3. Start MongoDB

Systemctl start mongod.service

# check whether the MongoDB 27017 port service is enabled

Netstat-natp | grep 27017

4. Verify that the service is enabled. Log in to MongoDB

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