Linux Installation MongoDB

Source: Internet
Author: User

Oh da, every day is a small surprise.

A moment to download

Https://www.mongodb.org/downloads can be downloaded to select the appropriate version and operating system as needed

Two upload server

1 Upload server path and unzip

2 Creating a database folder

Mkdir/data/db/mongo3 Creating a log file Touch/usr/local/mongodb/logs

Three-start

/usr/local/mongodb/bin/mongod--dbpath=/data/db/mongo--logpath=/usr/local/mongodb/logs--logappend--port=27017-- Fork

Attention

Installation path for 1/usr/local/mongodb/bin/mongod:mongod

2/data/db/mongo: Data path

3/usr/local/mongodb/logs: Log Path

4--port=27017: Default Port 27017

5--fork: Indicates background boot

Four questions

1 start times wrong

Error:couldn ' t connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146

Cause: Mongo.lock file corruption

Resolution 1: Repair the file Mongod--repair

Resolution 2: Remove the Mongo.lock file restart

Then Blingbling started, originally in trouble How to copy table structure, the result said MongoDB non-relational database, do not set table structure, good happy, afternoon insert data to see.

2 Attention to permissions issues

Linux 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.