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 community version MongoDB under Mac

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

Share

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

MongoDB download address: https://www.mongodb.com/download-center?_ga=2.98072543.1777419256.1515472368-391344272.1515472368#community

1. Decompression

Tar-zxvf mongodb-osx-ssl-x86_64-3.6.1.tgz

2. Create a MongoDB program directory

Mkdir-p / workspace/mongodb

Cp-R-n mongodb-osx-ssl-x86_64-3.6.1 / workspace/mongodb

3. Add MongoDB bin to the environment variable

Sudo vi / .bash_profile

Export PATH=/workspace/mongodb/bin:$PATH

4. Create a MongoDB Data directory

Mkdir-p / data/db

5. Start MongoDB

Mongod-- dbpath "/ data/db"

6. Connect MongoDB

Mongo

7. Testing

/ / write data

Db.test.insert ({'name':'test'})

/ / View

Db.test.find ()

8. You can use robomongo as the client of mongodb

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