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

About the manual installation of mongodb under mac, non-homwbrew installation (Xiaobai please come in)

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

Share

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

It's another headache. I have to write it down and complain that my understanding of mac bash shell is too rough.

Since I wanted to deploy elasticsearch to support mongodb's search, I later learned that elasticsearch needed a

A plug-in of elasticsearch river to support it. Check that the version of mongodb installed by yourself is 3.0.1.

His river only supports 3.0.0. Well, I wanted to try it, but I wanted to downgrade mongodb because of the cleanliness fetish of perfectionism.

1:

First check the homebrew, whether to support a specific version of the installation, toss for a long time to find! No, no! But! To! Fk

We have to install it manually.

2: then go to the official website to download a specific version of the tar file, install the official document to decompress, install, and configure the path. There is nothing in the document that does not tell Xiaobai.

It is mentioned in the document:

Here we need to configure his path (open the ~ / .bashrc file directly with vim). All right, I've configured it.

Export PATH=/bin:$PATH

Then it is found that when shell is turned off and then opened, the path cannot be found again. It turns out that when shell starts, it starts from ~ / .bash_profile by default, so copy the bashrc file to this file obediently, specifically:

Source / .bashrc

Save, then newly open shell, and find that mongod and mongo can be used, but there is still a problem here because of directory permissions.

Then run

Chmod-R aquir / data/db

Just give the permission of the folder to mongo, and finally get it done!

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