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