Good foundation enjoy carrying tons of loads!
- Install XCode command line tools
- Set up Homebrew
- Install and configure git
- Install latest python2 and python3 and virtual environment
- Install and configure nvm & Node.JS
- Install PostgreSQL & MongoDB
- Add on optional software
We will be doing most of the work within the Terminal:
To open the Terminal in your Mac, simply open up the Finder by pressing command + spacebar and type in Terminal.
Once, your Terminal is open, you are ready to begin!
The XCode Command Line Tools Package is a small package that allows you to do command line development in OS X. It consists of two components: OS X SDK and command-line tools like Clang, which are installed in /usr/bin.
In the Terminal, type the following to install:
$ xcode-select --installNote: The $ denotes the beginning of an entry in the terminal. You should not type the '$' in.
If you plan on going into Native iOS application development down the road, I recommend you download the whole XCode package from the App Store.
Homebrew is an open-source software package management system that makes the installation of software a breeze on OS X.
In the Terminal, type the following to install:
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"In the Terminal, type:
$ brew doctorSee what the Doctor says. You may need to edit your ~/.bash_profile or make other adjustments.
To update packages in the future, simply run:
$ brew update
$ brew upgradeYou can also find out which packages are outdated with:
$ brew outdatedSince Homebrew does not uninstall old versions of a formula, you will accumulate them over time. Simply use:
$ brew cleanupThis command will clean everything at once.
Install git:
$ brew install gitConfigure your name:
$ git config --global user.name "Insert Name"Then, if Github account, insert your email below. Otherwise, sign up.
$ git config --global user.email [email protected]To cache your credentials, run in the following command in your Terminal:
$ git config --global credential.helper cacheSystem comes with built-in python already. But if you want to use latest python 2.7.x and 3.x use Homebrew.
One advantage is that brew also install pip package manager addtionally. When using system python you need
to install pip follow the help here
brew install python python3Install virtualenv and virtualenvwrapper and other advanced virtual environment managers as you needed. One can find a detailed instruction in here
To install virtualenv:
pip install virtualenvTo install virtualenvwrapper (make sure virtualenv is already installed):
pip install virtualenvwrapperThen add in your environment file, subl ~/.bash_profile the following lines (assuming sublime is installed)
export WORKON_HOME=~/Envs
source /usr/local/bin/virtualenvwrapper.sh
Then run source ~/.bash_profile
Now you have installed virtual environment for python and there are 2 ways to create virtualenv
-
- To create virtualenv inside the project directory, just run
virtualenv env - To activate the virtualenv you have created, here
env, runsource env/bin/activate - To deactivate, simply run
deactivate
- To create virtualenv inside the project directory, just run
-
- To create virtaulenv with virtualenvwrapper, run
mkvirtualenv envthe enviroment will be setup in your~/Envs, theWORKON_HOME. - Then from anywhere you can access the virtual environemt by running
workon env
- To create virtaulenv with virtualenvwrapper, run
nvm is an awesome Node.JS version manager. The best part? It can be installed easily with Homebrew.
Rule of Thumb: If you are running npm with sudo, you are doing it wrong.
To install or update nvm, you can use the install script using cURL:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
or Wget:
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
The script clones the nvm repository to ~/.nvm and adds the source line to your profile (~/.bash_profile, ~/.zshrc or ~/.profile). NB. The installer can use git, curl, or wget to download nvm, whatever is available.
To install the latest version of Node.JS (21/01/2016):
nvm install 5When you have multiple node versions installed, Choose your version of interest
nvm use 5PostgreSQL is one of the most advance open-source SQL databases in the world (more on that down the road).
MongoDB is a document-oriented (NoSQL) database. It stands for huMONGOus because it's designed for big data.
In your Terminal, run:
brew install mongodb postgresqlWe will be exploring both of these databases more in-depth down the road.
Install MacDown. MacDown allows you to create, read, and edit Markdown files.
A lot of programs will require Java. You can download the latest by googling "Java OS X"
Atom is an open-source text-editor created by Github. You will need a trustworthy text-editor for your journey. Some alternatives are: Sublime, Vim, or Visual Studio.
Credits : Stanley