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 configuration-replica set

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

Share

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

Mongodb configures 192.11.11.11 as a master node

192.11.11.12 is the arbitration node

192.11.11.13 is the backup node

1. Download the tar package

Https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.2.tgz

2. Decompression

Rm-rf / neworiental/mongodb

Tar-zxvf / neworiental/tools/mongodb-linux-x86_64-4.0.2.tgz-C / neworiental/

Mv / neworiental/mongodb-linux-x86_64-4.0.2 / neworiental/mongodb

3. Set up a directory folder

Mkdir-p / neworiental/mongodb/data/master

Mkdir-p / neworiental/mongodb/data/slaver

Mkdir-p / neworiental/mongodb/data/arbiter

Mkdir-p / neworiental/mongodb/log

Mkdir-p / neworiental/mongodb/master

Mkdir-p / neworiental/mongodb/slaver

Mkdir-p / neworiental/mongodb/arbiter

Mkdir / neworiental/mongodb/keyFile/

4. Configuration file

Addr=/sbin/ifconfig-a | grep inet | grep-v 127.0.0.1 | grep-v inet6 | awk'{print $2}'| tr-d "addr:"

Cat

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

Servers

Wechat

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

12
Report