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

CentOS6.4 install MongoDB

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

Share

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

1. Download MongoDB (64-bit)

Http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.9.tgz

Or

Http://pan.baidu.com/s/1mgyRB8c

2. Install MongoDB (install to / usr/local)

Tar zxvf mongodb-linux-x86_64-2.4.9.tgzmv mongodb-linux-x86_64-2.4.9 mongodbcd mongodbmkdir dbmkdir logscd binvi mongodb.conf

Dbpath=/usr/local/mongodb/dblogpath=/usr/local/mongodb/logs/mongodb.logport=27017fork=truenohttpinterface=true

3. Rebind the configuration file address of mongodb and access IP

/ usr/local/mongodb/bin/mongod-- bind_ip localhost-f / usr/local/mongodb/bin/mongodb.conf

4. Boot and start mongodb automatically.

Vi / etc/rc.d/rc.local/usr/local/mongodb/bin/mongod-- config / usr/local/mongodb/bin/mongodb.conf

5. Restart the system to test whether it can be started automatically.

/ usr/local/mongodb/bin/mongo# View database list show dbs# current db version db.version ()

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