The earliest ports management was BSD, and then a powerful Debian, a dpkg+apt!.
Mac OS X is the first to use a lot of tools is macports, but now see this tool is a bit old, not very stable, then we recommend you install brew.
The commands for installing brew are as follows:
sudo su
-L http://github.com/mxcl/homebrew/tarball/master | tar xz--strip 1-c/usr/local
The brew command already exists in your system, using brew to install a RAR decompression tool Unrar! Here's how:
sudo brew install Unrar
If you want to uninstall it is also simple:
sudo brew uninstall Unrar
To find out if brew can install the tool you want, take lighttpd for example, the command is as follows:
/lighttpd* /
If you cannot install homebrew if MacPorts is installed, you must first uninstall MacPorts:
$ sudo port-F Uninstall installed
$ sudo rm-Rf\
/Opt/Local \
/Applications/Darwinports \
/Applications/MacPorts \
/Library/Launchdaemons/Org.MacPorts.* \
/Library/Receipts/Darwinports*.Pkg\
/Library/Receipts/MacPorts*.Pkg\
/library/startupitems/darwinportsstartup \
/library/tcl/darwinports1. 0 \
/library/tcl/macports1. 0 \
~/.
Mac OS X Install Brew tool!