
# Advanced Mac OS installations
<br />
## Introduction
Congrats Ironhacker! If you are in this section, it means you have successfully finished your prework!
Now, it is time for the final push to set yourself for success in the bootcamp - we will guide you through the installations of the tools you will be using on the class, and later as a developer.
:::danger
:rotating_light: It is **absolutely essential** that your Mac user account **has Admin rights**. You won't be able to install and use everything you need without those rights. If you are using a work computer with limited privileges, contact your IT person to grant you admin access.
:::
## Step #1: Install [nvm](https://github.com/nvm-sh/nvm)
Remember the [Homebrew](https://brew.sh/)? In case you missed installing this earlier, please refer to the lesson _Mandatory Mac Installations for the prework_. We will be using _brew_ command to install the _nvm_.
[nvm](https://github.com/nvm-sh/nvm) is a terminal command that allows you to install and change between different versions of Node.js. Usually, your system can have only one version of Node.js installed at one time. With [nvm](https://github.com/nvm-sh/nvm), you can switch to a newer version, try some new features, and then back to an older version for your more serious projects.
- Run these commands one by one in your terminal:
```shell
$ mkdir ~/.nvm
$ brew install nvm
```
- Use your editor to open your terminal settings file (`.zshrc` or `.bash_profile`):
```shell
$ code ~/$([ -n "$ZSH_VERSION" ] && echo ".zshrc" || echo ".bash_profile")
```
- In your editor, copy/paste these lines and save:
```shell
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" # This loads nvm bash_completion
```
- Close and reopen all your terminal windows.
## Step #2: Install [Node.js](https://nodejs.org/)
- Visit [the Node.js website](https://nodejs.org/).
- Check the version number of the **LTS version** of Node.js.
- Run this command in your terminal (replace `12.16.0` with the latest version number):
```shell
$ nvm install 12.16.0
```
Sidenote: You can use _brew_ to install _node_ as well. In case you are curious about how to do it, check these [guidelines](https://gist.github.com/ironhack-edu/1bf40cd9d5fe4f0de9d1247831817e38).
## Step #3: Install [MongoDB on MAC OS](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/)
[MongoDB](https://www.mongodb.com/what-is-mongodb) is the database we will be teaching in the course. Every app needs a database to store its information. There are many different databases, each with its pros and cons — more on this during the course.
Run the following commands in your terminal:
1. Tap the MongoDB Homebrew Tap
```shell
$ brew tap mongodb/brew
```
2. Install MongoDB
```shell
$ brew install mongodb-community
```
3. Start MongoDB
:::warning
:warning: You shouldn't have to start your database again after restarting your computer but write down the command just in case.
:::
```shell
$ brew services start mongodb-community
```
4. To start using it, we have to connect [mongo shell](https://docs.mongodb.com/manual/reference/program/mongo/#bin.mongo) to the instance of the database we just run. Open a new window in your terminal, and type the following (doesn't matter where you are, meaning in which folder):
```shell
$ mongo
```
:::info
In case you have installed Catalina OS on your Mac, you might face some errors. Check the following [article](https://apple.stackexchange.com/questions/362883/mongodb-doesnt-work-after-update-to-macos-catalina-10-15) and try to solve the problem.
:::
## Step #4: Install [MongoDB Compass](https://www.mongodb.com/products/compass)
- Visit [the Download and Install Compass page](https://docs.mongodb.com/compass/master/install/).
- Select _MACOS_.
- Follow the instructions to install the MongoDB Compass app.
<br>
You are good to go. Good luck! :heart:
## Extra resources
- [Why passwords are not visible in the terminal?](https://askubuntu.com/questions/112069/nothing-shows-up-in-the-terminal-when-i-type-my-password)