MongoDB Version Upgrade 3.4 to 3.6
Upgrade of Mongo 3.4 to 3.6
Please follow below steps to upgrade from Mongo 3.4 to 3.6
Pre-requisites:
1.
Make sure your Mongo version running on Mongo
3.4
2.
Connect to Mongo Shell and run the below command
on the Primary Node
a.
db.adminCommand( { setFeatureCompatibilityVersion:
"3.4" } )
POC:PRIMARY> db.adminCommand( { setFeatureCompatibilityVersion:
"3.4" } )
{ "ok" : 1 }
POC:PRIMARY>
3.
Make sure you have the Mongo 3.6 binaries ready
Upgrade Procedure:
1.
Stop the Mongod service on one of the secondary
node
Sudo /etc/init.d/monogd stop
2.
Un-tar the Mongo.3.6.tz file to a location
[root@dfwlncmgdb-06
kolguk01]# tar -xvf mongodb-linux-x86_64-rhel62-3.6.3.tgz
3.
Replace
the Mongo binaries present in the /usr/bin location with the Mongo 3.6 binaries
yes | cp -rf /home/kolguk01/mongodb-linux-x86_64-rhel62-3.6.3/bin/*
/usr/bin/
4.
Make changes to the mongod configuration file,
add a new parameter bindIpAll
vi /etc/mongod.conf
#override
port
net:
port:
27018
#bindIp:
151.138.21.74 #IP address of the node
bind_ip_all=true
5.
Start the Mongod Process
Sudo /etc/init.d/monogd start
6.
Connect to the Mongo shell and verify the
version
[root@dfwlncmgdb-04
kolguk01]# mongo --port 27018 --host dfwlncmgdb-04
MongoDB
shell version v3.6.3
connecting
to: mongodb://dfwlncmgdb-04:27018/
MongoDB
server version: 3.6.3
7.
Wait until the node be in sync with Primary
Once the node becomes secondary; follow the same steps on other
secondary and then finally do it on the Primary.
Comments
Post a Comment