Step 1: Set the PATH

Launch Terminal.app from the /Applications/Utilities folder.

The first thing we’ll do is set your shell’s PATH variable. The PATH variable determines where your system searches for command-line programs. You’ll need to set it so that it can find the new apps you’re about to install. Using the editor of your choice, create and edit a file in your home directory named .profile (note the “.” preceding the filename).

Close and save the file and run this command to load the new setting into your current shell:

source ~/.profile

To verify that you’ve updated your path, enter the following command:

echo $PATH

You should see /usr/local/bin at the beginning of the line returned by the system.

Step 2: Download

We’re going to create a folder to contain the files we’re about to download and compile. If you want, you can delete this folder when you’re done, but keeping it around makes it easier to re-install (or uninstall) these apps later.