Skip to content

kompseye/mac-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

About

How to setup Mac with developer tools

Homebrew

Important: the logged-in user needs to have Administrative privileges.

  1. Go here and follow instructions
  2. Verify installation with command brew --version
  3. You will also have Git git --version

Update Brew? brew update to see what's outdated then brew upgrade

Node

Node Version Manager (NVM) is an important too for Node.js development. It allows you to swith between multiple versions of Node.js

  1. Go here and follow instructions
  2. Verify installation with command: nvm --version
  3. Use NVM to display the available versions to install: nvm ls-remote --lts
  4. Use NVM to install based on LTS name: nvm install --lts=LTS_NAME_HERE. Installations can also be done to a specific version: nvm install vX.YY.Z
  5. Use NVM to use a specific version: nvm use vX.YY.Z

Environment

  1. Ensure you have .bash_profile file with vi ~/.bash_profile
  2. Add this to the file
if [ -r ~/.bashrc ]; then
   source ~/.bashrc
fi
  1. Ensure you have a .bashrc file with vi ~/.bashrc
  2. If you followed this README so far, you will have a .bashrc with information for NVM.
  3. Add aliases, functions, and other environment customizations to the .bashrc.

GitHub

  1. Create GitHub Account
  2. Follow these instructions
  3. If you have Multi-Factor Authencation (MFA), then HTTPS authentication will not work. Instead create SSH keys or personal access token.

Ruby

  1. Install Ruby Version Manager (RVM)
    • Install: \curl -sSL https://get.rvm.io | bash
    • Post-install: source /Users/kompseye/.rvm/scripts/rvm
    • Install a version: rvm install 2.7.0
    • Use a version: rvm use 2.7.0
    • Add docs: Ruby was built without documentation, to build it run: rvm docs generate-ri
  2. Use Interactive Ruby Shell (irb)
    • rvm ls
    • puts "hello world"
    • exit

Java

Nowadays there is the Oracle Java Development Kit (JDK) and Open JDK. Read more here.

  1. Install Java Version Manager (jenv): brew install jenv
  2. Follow instructions to update your shell configuration file
  3. Install Maven: brew install maven
  4. Install Java:
    • brew tap adoptopenjdk/openjdk
    • brew cask install adoptopenjdk13
  5. Verify Maven: mvn --version
  6. Verify Java: java --version
  7. Verify Java Compiler: javac --version

Brew installation problem?

cd /usr/local/Homebrew
git fetch --tags
git checkout 2.6.2 

Go back a version, see notes here

Go

  1. Go here: https://golang.org/
  2. Follow the installation instructions
  3. Verify checksum: shasum -a 256 installation-file.pkg
  4. Install
  5. Verify install: go version
  6. Suggestion: add the following function to .bashrc file, then run setgo in the command-line to update the PATH with the location for the Go distribution.
# you may need to update the go version
function setgo {
  export PATH=/usr/local/Cellar/go/1.19/bin/:$PATH
}

Using Homebrew? brew install go

Updating? brew update then brew upgrade go

Python with pyenv

  1. Go here: https://github.com/pyenv/pyenv
  2. Follow the installation instructions
    brew update
    brew install pyenv
    echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
    echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
    echo 'eval "$(pyenv init --path)"' >> ~/.profile
  3. After the installation pyenv --version will confirm the installation
  4. See also the ~/.profile which should resemble:
    # pyenv
    export PYENV_ROOT="$HOME/.pyenv"
    export PATH="$PYENV_ROOT/bin:$PATH"
    eval "$(pyenv init --path)"
  5. Find available versions to install:
    # https://www.python.org/downloads/
    pyenv install -l
    pyenv install 3.9.5
  6. Add virtualenv
  7. Follow the [installation](pyenv install 3.9.5) instructions
     brew install pyenv-virtualenv
     pyenv virtualenv 3.9.5 sandbox-3.9.5
     /bin/bash --login
     pyenv activate sandbox-3.9.5

About

Tips for setting up your Mac for development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published