安装
https://repo.mongodb.org/yum/redhat/7/mongodb-org/
vi /etc/yum.repos.d/mongodb-org-4.0.repo
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
yum install -y libcurl openssl mongodb-org
md5-6caaafa51d7aa69749069d2707af2dcf
[mongodb-org-3.6]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.6/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc
md5-5b6fec35b081f661839cf0e34187dc91
storage:
directoryPerDB: true
md5-6caaafa51d7aa69749069d2707af2dcf
cat >>/etc/rc.local <<EOF
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never> /sys/kernel/mm/transparent_hugepage/defrag
EOF
md5-6caaafa51d7aa69749069d2707af2dcf
service mongod restart