Get the App
SLTechnology News&Howtos  ›  Database  › 

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

Shulou Source: shulou.com Published: 2022-06-01 02:34:26 10月03日 Update

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!

Tags: File support document version path configuration permission or manual rookie headache rough thing doctrine obedience thing again official copy plug-in Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB vpn Shulou Information Xiaomi Shulou Tech Info