Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Install and solve the alarm of MongoDB3.4 under centos7

2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

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~

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report