Installing MongoDB under Linux

Source: Internet
Author: User
Tags snmp

One, download MongoDB file

(1) Various versions: Https://www.mongodb.org/dl/linux/x86_64

(2) Baidu cloud Download

Link: Https://pan.baidu.com/s/1JEK8ybzdyeia4olc96tR-A Password: bg66

Second, unzip the file (upload to the Linux process omitted)

Third, through the command line:

    • CD MongoDB (go to MongoDB directory)
    • CD Bin (enter bin directory)
    • ./mongod (run Start command)
    • If you see something wrong, don't worry, I'll read it slowly.

################################### #常见疑难杂症 ####################################

Your wrong situation could be

    • MongoDB default Data directory is/data/db, if this directory does not exist or is not writable, the server will fail to start
    • Solution: Mkdir-p/data/db, manually create a directory, and ensure that write rights
    • And maybe 27017 ports are occupied, what does that mean? Is that you have started the./mongod, no shutdown, so the port is occupied because MongoDB's default port is 27017
    • Solution: Open the command line separately, enter Ps-a, view the./mongod PID (process number), find the input kill-15 pid.
    • There may also be a need to execute under sudo
    • Continue to the Bin directory, enter sudo./mongod
    •  while loading shared libraries:libcrypto.so. 1.0. 0 object file:no such file or directory

      • The error is because the NET-SNMP is not installed

        Linux servers directly connected to the extranet can be used directly: Yum install NET-SNMP

When you start MongoDB, the input./mongod can be followed by other configuration parameters, not configured as the default, can be found on the Internet the corresponding detailed configuration of the blog

After success, we open another command line, still is the bin directory, input./mongo, start the MongoDB shell, enter help in the shell, you can see the specific method, here is not outlined.

Installing MongoDB under Linux

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.