The solution to restart mongo

​ During these days,when i start the mongon ,It will sometime fail because another mongo is running on the server.Here is some solutions for the problems.

i will try to make more details in the future.

1.if install using download (wget or curl)
#kill the process of mongo
pkill -9 mongo

#the command blow means the mongo will runing in the background
./mongod --fork --logpath /var/log/mongod.log
2.another way (if installed as package on system using package manager apt-get or yum) :
a) systemctl restart mongod
b) service mongod restart
3.how to stop the firewall:
systemctl stop firewalld.service

猜你喜欢

转载自blog.csdn.net/u014229742/article/details/80921667
今日推荐