docker pull mongo docker run --name mongo --restart=always -p 27017:27017 -v /mnt/mongodb/data:/data/mongo/db -v /mnt/mongodb/backup:/data/mongo/backup -v /mnt/mongodb/logs:/data/mongo/log -v /mnt/mongodb/conf:/data/mongo/conf -d mongo docker exec -it mongo /bin/bash use admin db.createUser( { user: "admin", pwd: "admin", roles: [ { role: "root", db: "admin" } ] } ); ruby -e "require 'net/http'; require 'json'; puts JSON.parse(Net::HTTP.get(URI('https://www.howsmyssl.com/a/check')))['tls_version']"
搜索
复制
<iframe></iframe> 标签:mongo,admin,MongoDB,mnt,mongodb,docker,data From: https://www.cnblogs.com/linyijia/p/16587831.html