Mac - Quick Setup Guide for Development Environment
"A comprehensive guide to setting up a development environment on macOS, covering essential tools and software."
Table of Contents
Essential tools for software development in macOS environment. (Below setup was being used for Apple Silicon and Intel Macs)
Initial System Configuration and Prerequisites
Before installing any development tools, install Homebrew and the required dependencies.
Install Homebrew
Homebrew is a package manager for macOS that simplifies the installation of software.
- Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Add Homebrew to PATH: For Apple Silicon:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)"
For Intel Macs:
echo 'eval "$(/usr/local/bin/brew shellenv)"' >> ~/.zprofile eval "$(/usr/local/bin/brew shellenv)"
Update Homebrew and Install Prerequisites:
brew update
brew upgrade
brew install curl wget git openssl readline sqlite3 xz zlib tcl-tk
This command installs essential tools and libraries for development on macOS:
- Core utilities:
curl
,wget
, andgit
for downloading files and version control - Development libraries: SSL (
openssl
), compression (xz
,zlib
), database (sqlite3
), and others
Programming Language Environments
SDKMAN: Java Development Kit and Build Tools
SDKMAN is a tool for managing parallel versions of SDKs. We'll use it to install Java 17, Maven, and Gradle.
- Install SDKMAN:
curl -s "https://get.sdkman.io" | bash
Initialize SDKMAN: For Zsh (
~/.zshrc
):echo 'source "$HOME/.sdkman/bin/sdkman-init.sh"' >> ~/.zshrc source ~/.zshrc
For Bash (
~/.bash_profile
):echo 'source "$HOME/.sdkman/bin/sdkman-init.sh"' >> ~/.bash_profile source ~/.bash_profile
Install Java 17, Maven, Gradle:
sdk install java 17.0.8.1-tem
sdk install maven
sdk install gradle
- Verify Installations:
java --version
mvn --version
gradle --version
pyenv: Python Version Management
pyenv is a tool to manage multiple Python versions on your system.
- Install pyenv with Homebrew:
brew install pyenv
Add pyenv to Shell Startup: For Zsh (
~/.zshrc
):echo -e '\n# pyenv setup' >> ~/.zshrc echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.zshrc echo 'eval "$(pyenv init --path)"' >> ~/.zshrc echo 'eval "$(pyenv init -)"' >> ~/.zshrc source ~/.zshrc
For Bash (
~/.bash_profile
):echo -e '\n# pyenv setup' >> ~/.bash_profile echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bash_profile echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile echo 'eval "$(pyenv init -)"' >> ~/.bash_profile source ~/.bash_profile
Install and Set Python 3.12.3:
pyenv install 3.12.3
pyenv global 3.12.3
python --version
Containerization and Services
Docker: Containerization Platform
- Install Docker Desktop:
brew install --cask docker
- Verify Docker Installation:
docker --version
docker run hello-world
Development and Productivity Tools
Database Management: DBeaver
- Install DBeaver:
brew install --cask dbeaver-community
Code Editors and IDEs
- Visual Studio Code:
brew install --cask visual-studio-code
- IntelliJ IDEA Community Edition:
brew install --cask intellij-idea-ce
Utility Applications
Web Browser: Google Chrome
- Install Google Chrome:
brew install --cask google-chrome
Office Suite: LibreOffice
- Install LibreOffice:
brew install --cask libreoffice
System Cleanup and Maintenance
brew cleanup
Conclusion
This guide provides a comprehensive setup for a robust macOS development environment. Feel free to customize the tools and versions according to your specific needs. Remember to:
- Keep your system and tools updated
- Refer to official documentation for specific tool configurations
- Customize the setup to match your development workflow
Pro Tip: Use version managers like SDKMAN and pyenv to easily switch between different language versions and maintain project-specific environments.