Installation and notes for Ubuntu under MONGO

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.