deepin吐血安装mongodb

下个mongodb,但只用客户端:

http://downloads.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-v4.2-latest.tgz
export PATH=$PATH:/usr/local/hive/bin
export MONGODB_HOME=/usr/local/mongodb  
export PATH=$PATH:$MONGODB_HOME/bin

因为mongodb的server安装失败,我退而求其次用docker安装

docker run -d --name mongo --net host mongo:latest

mongodb用的27017端口,我们看看

(base) ~ ᐅ netstat -nlpt | grep 27017
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:27017           0.0.0.0:*               LISTEN      -

在终端中启动客户端

mongo

成功了。

发布了298 篇原创文章 · 获赞 36 · 访问量 7万+

猜你喜欢

转载自blog.csdn.net/TQCAI666/article/details/104235024