📜  全局初始化 mongodb 期间出错 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:44.111000             🧑  作者: Mango

代码示例1
==> check /var/log/mongodb and /var/lib/mongodb for mongondb with (user==>mongodb) and the permissions.

sudo chown mongodb:mongodb /var/log/mongodb/mongod.log
sudo chown mongodb:mongodb /var/lib/mongodb/*

==> then start/restart the mongod service

sudo service mongod start
sudo service mongod restart