1. Install MacPorts (v2.1.2)
Download from http://www.macports.org/,Choose the Mac OS version of your platform,download the dmg file and install. After installed, we should update MacPorts to latest version, run below command.
$sudo port -fvds selfupdate