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

Mongodb3.,4.4 installation based on centos7 system

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Download and install mongodb

Wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-3.4.4.tgztar zxvf mongodb-linux-x86_64-rhel70-3.4.4.tgzmv mongodb-linux-x86_64-rhel70-3.4.4 mongodb344

Configure mongodb

Cd mongodb344/mkdir datamkdir logsvim / opt/mongodb344/mongodb.confport=27017dbpath=/opt/mongodb344/data/rest=truelogpath=/opt/mongodb344/logs/mongodb.logpidfilepath=/opt/mongodb344/mongo.pidfork=truelogappend=trueshardsvr=true#directoryperdb=true#auth=truevim / etc/rc.d/init.d/mongodlimit-SHn 655350 chkconfig:-643 pound description:mongodcase $1 instart) mongod-- maxConns 20000-- config / opt/mongodb344/mongodb.conf;;stop) / opt/mongodb344/bin/mongo 127.0.0.1:27017/admin-- eval "db.shutdownServer ()" ; status) / opt/mongodb344/bin/mongo 127.0.0.1:27017/admin-- eval "db.stats ()"; esac

Set boot self-boot

Chmod + x / etc/rc.d/init.d/mongodchkconfig mongod onecho never > / sys/kernel/mm/transparent_hugepage/enabledecho never > / sys/kernel/mm/transparent_hugepage/defrag/etc/init.d/mongod start/etc/init.d/mongod stop/etc/init.d/mongod status

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