Архив рубрики: bash

Install mongodb on MacOS by steps

link   link2

For example install MondoDB 2.6.12 on macOS Catalina

  1. Download, extract and move:

    wget http://downloads.mongodb.org/osx/mongodb-osx-x86_64-2.6.12.tgz

    tar xzf mongodb-osx-x86_64-2.6.12.tgz

    mv mongodb-osx-x86_64-2.6.12/ /usr/local/mongodb/

  2. Add to file ~/.zshrc this:

    export PATH="$PATH:/usr/local/mongodb/bin"

    PS: .bash_profile or .profile not worked in my case

  3. Mkdir directory for data and set rights:

    mkdir -p ~/data/db

    chown -R mongodb.mongodb ~/data/db

  4. Run MongoDB:

    mongodb --dbpath ~/data/db

work process

sudo lsof | grep nsurl
ps -ef|grep nsur
sudo fs_usage -w | grep nsurl

bash macos

export PS1=»\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ «
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls=’ls -GFh’