Get the App
SLTechnology News&Howtos  ›  Database  › 

Install and solve the alarm of MongoDB3.4 under centos7

Shulou Source: shulou.com Published: 2022-06-01 02:16:34 10月02日 Update

MongoDB official network download installation package version 3.6.8 this wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel62-3.6.8.tgz3.4.18 this wget https://fastdl.mongodb.org/linux/mongodb-linux-x-x86_64-rhel62-3.6.8.tgz3.4.18 this wget://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel62 - 3.4.18.tgz Decompress tar zxf mongodb-linux-x86_64-rhel62 - 3.4.18.tgzmv mongodb-linux-x86_64-rhel62 - 3.4.18/usr/local/mongodb-linux odbecho 'export PATH =$PATH:/usr/local/mongodb/bin'>>/etc/profilesource/etc/profilegroupadd mongouseradd-g mongo mongomkdir-p/server/mongodb27017/datamkdir-p/The requested URL/images/mongodb27017/chown-R mongo. mongo was not found on this server. /usr/local/mongodbvim /server/mongodb27017/mongodb27017.cnf

profile

#SERVERfork = trueport = 27017quiet = true dbpath = /server/mongodb27017/datalogpath = /server/mongodb27017/log/mongod.loglogappend = truejournal = true#auth = true #Enable authentication #>/sys/kernel/mm/transparent_hugepage/enabled

echo "never" >> /sys/kernel/mm/transparent_hugepage/defrag

Add it to/etc/rc. local

Alert 3

** WARNING: soft rlimits too low. rlimits set to 4096 processes, 65535 files. Number of processes should be at least 32767.5: 0.5 times number of files. solution vim/etc/security/limits. confmongo soft nofile 65535mongo hard nofile 65535mongo soft nproc 65535mongo hard nproc 65535mongo soft stack 1024mongo hards tack 1024vim/etc/security/limits. d/90-nproc. confsoft nproc 65535

Alert 4

WARNING: Access control is not enabled for the database.2018-11-15T17:38:44.181+0800 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted. use admindb. createUser ({user:"root",//username pwd: "root",//password roles: [{role:"userAdminAnyDatabase", db: "admin "}]//permissions} Add auth = true to the configuration file

After solving it in turn, enter the shell command line, really clean! There is no warning message. It is simply gospel for obsessive-compulsive disorder patients O ($>_$>) O haha~

Goodbye everyone~

Tags: Command user backward data database file time version configuration clean normal no personal sub-health information stress password obsessive-compulsive disorder patient feeling Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Shulou Information Docker Xiaomi Apple