Environment Build

Last Updated on2020-02-17 07:40:12

Install nvm

The user enters in the terminal:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash

Faqs

  1. Enter nvm -v Will Appear -bash: nvm: command not found

  2. After copying the following code in the ~ / .bash_profile file, source ~ / .bash_profile can be

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"

Install node using nvm

nvm install stable # Install the latest stable version of node
nvm install 4.2.2 # Install version 4.2.2
nvm install 0.12.7 # Install version 0.12.7

Frequently-used nvm commands

  • View installed versions:nvm ls

  • View available versions:nvm ls-remote

  • Install the specified version:nvm install version

  • Delete the specified version:nvm uninstall version

  • Use selected version:nvm use version

Download XCode in the App Store (required for brew environment)

Install Homebrew

The user enters in the terminal:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install Git

  1. Install
brew install git
  1. Configure username and email
git config --global user.name "your_name"
git config --global user.email "your_email@mail.com"
  1. View git configuration information
git config --list