① Download the installation package mongodb-linux-x86_64-rhel62-3.6.3.tgz② Decompression: tar zxvf mongodb-linux-x86_64-rhel62-3.6.3.tgz③ Renaming: MV mongodb-linux-x86_64-rhel62-3.6.3/mongodb-3.6.3④ Entry directory: CD mongodb-3.6.3/⑤ New directory:mkdir conf (boot configuration file) mkdir logs (log file) mkdir data (data storage file) at this time the directory structure such as:
⑥ Create a new profile and edit it in the Conf directory: VI mongod.confNote:Dbpath=/home/mongodb/mongodb-3.6.3/data (The Data directory path created)logpath=/home/mongodb/mongodb-3.6.3/logs/mongod.log (log file path created)fork = True (lets the program start in the background)⑦ start the Mongod background process./bin/mongod-f conf/mongod.conf The following log indicates that a successful startup can also be viewed in the data and logs directories, all of which have a ⑧ client connection./bin/mongo 127.0.0.1:20017/test The following interface indicates successful connection
Linux on the MongoDB installation deployment