Linux Platform Installation MongoDB

Source: Internet
Author: User
Tags mongodb robomongo

  

1. To the official website, select the appropriate version to download

Https://www.mongodb.com/download-center#community

2. Unzip

    tar -zxvf mongodb-linux-x86_64-ubuntu1604-3.4.0.tgz

3. Move to the/usr/local/directory

    sudo mv -r mongodb-linux-x86_64-ubuntu1604-3.4.0/ /usr/local/mongodb

4. Add the executable file to the path

    export PATH=/usr/local/mongodb/bin:$PATH

Service side
    • The command for the service is Mongod, and you can view all the parameters through Help
mongod --help
    • Config file in/etc/mongod.conf, default port is 27017
    • Recommended ways to use the service management
    • Start
sudo service mongod start 不同的版本可能是(mongodb start)
    • Stop it
sudo service mongod stop
    • Restart
sudo service mongod restart
    • Review the process after startup to determine whether the startup was successful
ps ajx|grep mongod
    • If no Mongod entries in the process are successful, you can view the logs to determine the cause of the error, the log directory is/var/log/mongodb/mongod.log, and the latest information is at the bottom
Client
    • The client command is MONGO and can be used to view all parameters
    • This shell is the client of MongoDB, and also a JS compiler.
mongo --help
    • Terminal Exit connection
exit或ctrl+c
    • Gui:robomongo
    • Unzip the package into Ubuntu
tar zxvf robomongo-0.9.0-linux-x86_64-0786489.tar.gz
    • Enter the extracted directory and locate the running program in the bin directory
robomongo



Linux Platform Installation MongoDB

Related Article

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.