Using MacPorts

Changing from linux to OS X? Disappointed because you can’t find all the nice tools you’ve got with ubuntu?

The MacPorts port collection turns your mac OS X computer into a fully functional UNIX system.

The MacPorts port collection is an archive including thousands of UNIX tools and programs usable witch your mac. All the programs are delivered in source code and the MacPorts-tools will help you to download, install and keep it up to date. Everything quiet easy, and you just have to know a few commands. But let’s start from the beginning:

To install MacPorts go to

http://www.macports.org -> “Install MacPorts”

and download the latest disk-image (.dmg) file for your OS X. Mount the file and start the installer. After the installer has finished, open a terminal like iTerm or the OSX standard terminal application “Terminal” (/Applications/Utilities/Terminal.app).

The first thing you have to do, always before you start working with MacPorts, is updating your local ports tree. This is the information base, where all available ports are referenced.

sudo port selfupdate

This can take a while. After this is done, you can start installing new ports.

search for an available program:

port search bind9

bind9 @9.7.3 (net) Domain Name System server

This information tells you, that there is a port called “bind9” with the version 9.7.3. Try out some other search words to see whats available. Sometime you’ll find a huge list of available ports.

To install bind9 type:

sudo port install bind9

Now this will take its time. Port will now start to resolve all dependencies and download all source code files, then bind9 will be compiled. You will find a lot of informations during the installation printed out to your terminal.

The most is now done. There are some other useful commands i’d like to explain:

This will upgrade all your ports to the newest available version in MacPorts.

sudo port upgrade outdated

Will remove your bind9 installation.

sudo port uninstall bind9

Thats the most you’ll ever need. For more informations type

man port

or go to the website of the MacPorts collection: http://www.macports.org