mongodb 副本集创建
vi install_mongo.shtar -zxvf mongodb-linux-x86_64-rhel62-3.2.9.tgz
mv mongodb-linux-x86_64-rhel62-3.2.9 /usr/local/mongo
cat>>/etc/profile/etc/mongo_27017.conf use online
switched to db online
rs1:SECONDARY> rs.slaveOk()
rs1:SECONDARY> db.test1.find()
{ "_id" : ObjectId("57e943faff931e363a5a0309"), "name" : "aaa" }
页:
[1]