1, Download: wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.6.3.tgz
2, decompressing: the tar-Linux-x86_64-3.6.3.tgz -zxvf MongoDB
. 3, mounted to a the appropriate directory: I'm here to install under / usr / local / mongodb mongodb] [file that you create a folder
in the folder /usr/local/mongodb/mongodb-linux-x86_64-3.6.3/bin add a configuration file
vim mongodb.conf
# store directory database
. 1 dbpath = / usr / local / MongoDB / Data /
2 # log file path
. 3 logpath = / usr / local / MongoDB / Data / log / mongodb.log
. 4 is any additional log #
5 logappend = true
6 # port
. 7 port = 27017
. 8 # whether the background program starts
. 9 the fork = to true
10 # whether to start certification authority
. 11 the auth = to true
. 4, the configuration path path
vim / etc / profile
in the final addition of an export pATH = $ pATH: / usr / local / mongodb / mongodb-linux- x86_64-3.6.3 / bin
5, start the MongoDB
the mongod --config /usr/local/mongodb/mongodb-linux-x86_64-3.6.3/bin/mongodb.conf
6, view the process
PS -ef | grep MongoDB
root 2253 1 0 23:41 00:? 00:03 mongod --config /usr/local/mongodb/mongodb-linux-x86_64-3.6.3/bin/mongodb.conf -----> Description start successfully