In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces how to install mongodb 3.4.The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.
1. Mongodb download
Official download address: https://www.mongodb.com/download-center#community
Users without yueyu may download slowly. Please solve it yourself.
II. Environmental configuration
Test system centos6.8 ip address: 192.168.1.197
1. Close SELinux
Vim / etc/selinux/config
SELINUX=disabled
Setenforce 0
two。 Turn off the firewall
Service iptables stop
3. Add users and groups
Groupadd mongodb & & useradd-g mongodb mongodb
4. Upload the binary package to / opt, decompress it and authorize it
Cd / opt & & tar-xf mongodb-linux-x86_64-rhel62-3.4.5.tgz
5. Create a soft connection
Ln-s / opt/mongodb-linux-x86_64-rhel62-3.4.5 / usr/local/mongodb
6. Change the attribute
Chown-R mongodb:mongodb / opt/mongodb-linux-x86_64-rhel62-3.4.5
Chown-R mongodb:mongodb / usr/local/mongodb
7. Configure environment variables
Echo 'PATH=/usr/local/mongodb/bin:$PATH' > > / etc/profile
Source / etc/profile
8. Create relevant directories
Mkdir-p / data/mongo/ {db,log,tmp}
Mkdir-p / etc/mongodb
9. Create a mongodb configuration file
Vim / etc/mongodb/mongo.conf
Storage:
DbPath: / data/mongo/db
Journal:
Enabled: true
Engine: wiredTiger
SystemLog:
Destination: file
LogAppend: true
Path: / data/mongo/log/mongod.log
ProcessManagement:
Fork: true # fork and run in background
PidFilePath: / data/mongo/tmp/mongod.pid
Net:
Port: 27017
BindIp: 192.168.1.197127.0.0.1
Security:
Authorization: enabled
10. Authorization
Chown-R mongodb:mongodb / data/mongo
Chown-R mongodb:mongodb / etc/mongodb
11. Start mongodb
Su-mongodb
Mongod-config / etc/mongodb/mongo.conf
# ps aux | grep mongo
Mongodb 1649 0.6 1.1 1015552 46780? SLl 08:45 0:55 / usr/local/mongodb/bin/mongod-- config / etc/mongodb/mongo.conf
Mongodb 30100 0.0 103256 848 pts/0 S + 11:08 0:00 grep mongo
On how to install mongodb 3.4 to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.