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

MongoDB operation

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

Share

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

# = 2. Mongo==

# backup database

Mongodump-h 127.0.0.1-d eb_mongo-o / root/xichang/eb_mongo.bak

# restore the database

Mongorestore-d eb_mongo eb_mongo.bak/*-- drop

# install mongo

1. Add yum installation source for mongo

Vi / etc/yum.repos.d/mongo.repo # add yum installation source mongo.repo

[10gen]

Name=10gen Repository

Baseurl= http://downloads-distro.mongodb.org/repo/redhat/os/x86_64

Gpgcheck=0

# [mongodb-org-3.0]

# name=MongoDB Repository

# baseurl= http://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.0/x86_64/

# gpgcheck=0

# enabled=0

Yum install mongo-10gen mongo-10gen-server # mongo-10gen is a client tool

Service mongod start

Chkconfig mongod on

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