Installing and Configuring MacPorts

MacPorts are better way to install and updating various utilities in your mac, it is a command line tool. You can download latest and previous copies of MacPort from :,download .dmg files for easy installation or you can grab .tar.gz also.

Installing MacPort from Terminal:
  1. go to directory where you downloaded the .tar.gz file from terminal and run
    tar xjvfMacPorts-[version].tar.bz2
  2. build and install unpacked bundle
    cd MacPorts-[version]
    ./configure && make && sudo make install
Configuring MacPort from Terminal:

echo export PATH=/opt/local/bin:/opt/local/sbin:\$PATH$'\n'export MANPATH=/opt/local/man:\$MANPATH | sudo tee -a /etc/profile
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export MANPATH=/opt/local/man:$MANPATH

Optionally you can run a update command to self upgrade:

sudo port -v selfupdate