In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-10-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
I. create a directory
1.mkdir-p / home/mongodb/data/master
2.mkdir-p / home/mongodb/data/slaver
3.mkdir-p / home/mongodb/data/arbiter
II. Configuration file
1. Create a master.conf file
# master.conf
Dbpath=/home/mongodb/data/master
Logpath=/home/mongodb/log/master.log
Pidfilepath=/home/mongodb/master.pid
Directoryperdb=true
Logappend=true
ReplSet=testrs
Bind_ip=192.168.1.4
Port=27017
OplogSize=10000
Fork=true
Noprealloc=true
two。 Create an arbiter.conf file
# arbiter.conf
Dbpath=/home/mongodb/data/arbiter
Logpath=/home/mongodb/log/arbiter.log
Pidfilepath=/home/mongodb/arbiter.pid
Directoryperdb=true
Logappend=true
ReplSet=testrs
Bind_ip=192.168.1.12
Port=27017
OplogSize=10000
Fork=true
Noprealloc=true
3. Create a slaver.conf file
# slaver.conf
Dbpath=/home/mongodb/data/slaver
Logpath=/home/mongodb/log/slaver.log
Pidfilepath=/home/mongodb/slaver.pid
Directoryperdb=true
Logappend=true
ReplSet=testrs
Bind_ip=192.168.1.11
Port=27017
OplogSize=10000
Fork=true
Noprealloc=true
III. Start the command
Cd / home/mongodb/bin./mongod-f / home/mongodb/master.conf./mongod-- fork-- dbpath / home/mongodb/db-- logpath / home/mongodb/log/set1.log-- replSet test./mongod-- fork-- dbpath / home/mongodb/db-- logpath / home/mongodb/log/set1.log-- replSet test./mongod-- fork-- dbpath / home/mongodb/db-- logpath / home/mongodb/log/set1.log-- replSet test./mongo 192.168.1.4
four。 Actual combat
1. Engineering configuration
two。 Part of the core code
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.