Links

ΜΆ
Adam I. Gerard
ISU
NIU
CS MS TBD

Mac Install Notes

I don't like brew. Personal notes to get a development environment setup and configured on macOS 10.15.3.

Note: configuring .bash_profile is required for macOS-specific directory paths.

Note: configuring .bashrc is required for many Bash-specific paths.

Note: configuring .zshrc is required for many Zsh-specific paths (macOS Catalina+).

The notes below are written for Bash. In most cases, the same commands and export statements can be used interchangeably between Bash and Zsh (provided you use the correct configuration file).

Xcode

For developing Apple mobile, desktop, tablet, and watch, applications.

Swift installation:

  1. Use this link: https://apps.apple.com/us/app/xcode/id497799835 to get Swift + Xcode
  2. Test the installation using $ swift --version
  3. Test the Xcode installation using $ xcodebuild -version

CocoaPods:

  1. Requires Ruby gem manager
  2. Execute the following: $ sudo gem install cocoapods
  3. Use $ pod install to download the dependencies into your project
  4. NOTE: You must open the <PROJECT_NAME>.xcworkspace file rather than the <PROJECT_NAME>.xcodeproj file to build and compile your project (with Pods) correctly

Python 2.7

For Python, PIP, and Django apps.

Python 2.7 installation:

  1. Python 2.7 is pre-installed on macOS 10.x.
  2. Test the installation using $ python --version

PIP installation:

  1. Execute $ sudo easy_install pip
  2. Test the installation using $ pip --version

Django installation:

  1. Execute $ sudo pip install Django==3.0.3
  2. Alternatively, execute $ sudo pip install -r requirements.txt

Python 3

For Python 3.x.

Python 3.x installation:

  1. Download from: https://www.python.org/downloads/mac-osx/
  2. Test the installation using $ python3 --version

PIP:

  1. PIP is automatically installed as part of the Python 3 installation
  2. Upgrade PIP: $ python3 -m pip install --upgrade pip
  3. Install dependencies: $ python3 -m pip install -r requirements.txt
  4. List all installed libraries: $ pip freeze
  5. Clear out PIP cache: $ pip uninstall -y -r <(pip freeze)

Venv:

  1. Venv is automatically installed as part of the Python 3 installation
  2. Create a Venv environment: $ python3 -m venv VENV_ENV
  3. ... and activate it: $ source VENV_ENV/Scripts/activate

Ruby

For Ruby on Rails apps.

Ruby installation:

  1. Ruby 2.6.3p62 is pre-installed on macOS 10.x.
  2. Test the installation using $ ruby --version
  3. Test Ruby gem manager using $ gem -v

Rails installation:

  1. $ gem install rails

C++

  1. C++ GCC 4.2.1 is distributed with Xcode 11.3 (whose installation instructions are provided above).
  2. Test the installation using $ gcc --version

CMake:

  1. Download the CMake Unix/Linux Source (has \n line feeds) from: https://cmake.org/download/
  2. Extract the contents and execute $ bash bootstrap within the root directory
  3. Then execute $ cd Bootstrap.cmk and $ bash make
  4. Copy the following into .bash_profile using $ sudo nano ~/.bash_profile (and modify as needed):
export PATH=$PATH:/Users/USER_NAME/Desktop/cmake-3.16.6/bin
  1. Test the installation: $ cmake --version

Java

For Java Spring, Gradle, Maven, and Tomcat stacks.

Java installation:

  1. Use this link: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
  2. Test the installation using $ javac -version

Apache Tomcat 8.5.x installation:

  1. Download the .zip from http://tomcat.apache.org
  2. Copy the extracted directory to your desktop (or some other appropriate location)
  3. Navigate to the ROOT/bin directory and execute the following Bash command sudo chmod +x *.sh
  4. Execute $ sudo bash startup.sh to launch Tomcat on the default port localhost:8080

See the very helpful: https://wolfpaulus.com/tomcat/ for more comprehensive configurations.

Gradle installation:

  1. Download from: https://gradle.org/install/
  2. Copy the following into .bash_profile using $ sudo nano ~/.bash_profile (and modify as needed):
export PATH=$PATH:/Users/USER_NAME/Desktop/gradle-6.2/bin/
  1. Test the installation using $ gradle --version

Node

For NodeJS server and client apps.

NVM installation:

  1. $ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
  2. $ sudo touch ~/.bash_profile
  3. $ sudo touch ~/.bashrc
  4. $ sudo nano ~/.bash_profile - copy the contents below into this file
  5. $ sudo nano ~/.bashrc - copy the contents below into this file
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"

(Copy the above into configuration files.)

  1. Test the installation using $ nvm ls
  2. Download the desired version of Node using $ nvm install 10.0.0 && nvm use 10.0.0

Typescript installation:

  1. Execute npm install -g typescript

Golang

  1. Go to: https://golang.org/dl/ and download the newest version
  2. Install Go using the downloaded installer
  3. Test the installation using $ go version

Rust

For Rust apps.

Rust installation:

  1. Execute $ sudo curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. Test the installation using $ rustc --version

Rust uninstallation:

  1. $ rustup self uninstall

Read the Rust documentation.

Contents