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 Mongodb3.2.4 under CentOS6.5

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

Share

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

1. Download MongoDB (64-bit)

Https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel62-3.2.4.tgz

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

Tar zxvf mongodb-linux-x86_64-2.4.9.tgzmv mongodb-linux-x86_64-2.4.9 mongodb

3. Create a data directory and a log directory

Cd mongodbmkdir dbmkdir logs

4. Modify configuration file data (db) directory and log (log) directory

Cd binvi mongodb.confdbpath=/usr/local/mongodb/dblogpath=/usr/local/mongodb/logs/mongodb.logport=27017fork=truenohttpinterface=true

5. 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

6. Start mongodb automatically when booting

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

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

(1) # enter shell mode of mongodb

/ usr/local/mongodb/bin/mongo

(2) # View database list

Show dbs

(2) # View the 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