标签:mongod amp mkdir .com 数据库 epo repo 终端 npe
1 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
1 echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
apt-get
1 sudo apt-get update 2 sudo apt-get install -y mongodb-org
/home/mongodb
目录的问题1 sudo mkdir /home/mongodb 2 sudo chown -R mongodb:mongodb /home/mongodb
1 sudo systemctl start mongod (无法改变数据库路径) 2 mongo
1 mongod --dbpath <路径> 2 mongo (另外开启一个终端)
标签:mongod amp mkdir .com 数据库 epo repo 终端 npe
原文地址:https://www.cnblogs.com/dayofcoder/p/10732475.html