MongoDB: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
: <<'END_COMMENT' | : <<'END_COMMENT' | ||
bind_ip = 127.0.0.1 | bind_ip = 127.0.0.1 | ||
port = 27017 | |||
END_COMMENT | END_COMMENT | ||
Revision as of 09:53, 9 January 2021
apt install mongodb
nano /etc/mongodb.conf
: <<'END_COMMENT'
bind_ip = 127.0.0.1
port = 27017
END_COMMENT
systemctl start mongodb
systemctl enable mongodb
systemctl status mongodb
mongo
: <<'END_COMMENT'
> show databases;
local 0.03125GB
> use local
switched to db local
> show collections;
startup_log
> db.stats();
{
"db" : "local",
"collections" : 2,
"objects" : 2,
"avgObjSize" : 530,
"dataSize" : 1060,
"storageSize" : 10493952,
"numExtents" : 2,
"indexes" : 0,
"indexSize" : 0,
"fileSize" : 16777216,
"nsSizeMB" : 16,
"dataFileVersion" : {
"major" : 4,
"minor" : 5
},
"ok" : 1
}
>
END_COMMENT