mongodb upgrade from 3.0 to 3.2

Download mongodb:
curl "https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-debian71-3.2.7.tgz" -k -v -o mongodb-linux-x86_64-debian71-3.2.7.tgz

Unzip mongodb:
tar -xvzf mongodb-linux-x86_64-rhel62-3.2.7.tgz

Shut down mongod:
reference: https://docs.mongodb.com/manual/tutorial/manage-mongodb-processes/

backup old bin
sudo mv bin bin_back

copy bin
sudo cp -r ~/mongodb-linux-x86_64-rhel62-3.2.7/bin /usr/local/mongodb/

If there are iptables restrictions, modify the iptables of all related servers and directly modify the configuration file:
1 . Backup the configuration file: sudo cp /etc/sysconfig/iptables /etc/sysconfig/iptables.backup
2. Modify the configuration file: sudo vim /etc/sysconfig/iptables
3. Restart the iptables service: sudo service iptables restart

start a new mongod
Sudo bin/mongod -f conf/mongo.conf

Summary of problems:
1. exited with error number 1
but the log is not there, you need to remove the fork in the configuration file, so that the log can be printed to the terminal


Flower sleep studio: http:/ /huaxiamian.cc

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326616552&siteId=291194637