Download MongoDB:
Download and unzip to use.
In order to start convenient and unified management, in the MONGO root directory to establish/data,/logs,/conf folder.
Create the mongodb.conf file under the Conf folder with the following basic configuration:
#数据库数据存放目录dbpath =/usr/local/mongodb/data# Database log storage directory logpath=/usr/local/mongodb/logs/mongodb.log# Log in Append logappend = true# Port number default is 27017port=27017# run the process in the background fork=true# turn on user authentication #auth=true# turn off HTTP interface, turn off HTTP port access by default # nohttpinterface=true# enable the log file, enabled by default journal=true# This option can filter out some useless log information, if you need to debug use set to Falsequiet=true
MONGO Basic Command parsing:
Start MONGO:
./mongod-f. /conf/mongodb.conf
Client connections to verify the following:
./mongo
Try the command:
This way, MongoDB's Getting Started deployment and installation is done!
Getting Started with MongoDB Learning notes installation and configuration