Installation under Linux
Open Https://www.mongodb.com/download-center#community Select Linux and choose your own version copy download next to the link
Open Terminal input
Wget links
Next unzip
TAR-ZXVF downloaded file name
Move to the specified directory
Mv
Added to the path path
In Ubuntu
Vim ~/.BASHRC
At the end of the add
Export Path=/usr/local/mongodb/bin:$PATH
Create DB directory to put DB
Mkdir-p/data/db
Then run the service Mongod at the terminal
Enter MONGO Connection database
Show DBS shows all current databases show tables show all tables use database name using current database if not, CREATE database db. Table name. Insert () to add a document if there is no table, the DB is created automatically. Table name. Find () Find all documents under Table DB. Remove () Delete document DB. Table name. Drop () Delete table db.dropdatabase () Delete current database
Installation and notes for Ubuntu under MONGO