MongoDB: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<source lang="bash"> apt install mongodb systemctl enable mongodb systemctl start mongodb mongo : <<'END_COMMENT' > show databases; local 0.03125GB > use local switched to db...") |
No edit summary |
||
Line 1: | Line 1: | ||
<source lang="bash"> | <source lang="bash"> | ||
apt install mongodb | apt install mongodb | ||
systemctl start mongodb | |||
systemctl enable mongodb | systemctl enable mongodb | ||
systemctl | systemctl status mongodb | ||
mongo | mongo | ||
: <<'END_COMMENT' | : <<'END_COMMENT' |
Revision as of 09:39, 9 January 2021
apt install mongodb
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