Installation on Apple Mac OS X¶
Mac OS X 10.5 (Leopard) and 10.6 (Snow Leopard) come pre-installed with ruby, but we recommend that you install ruby from MacPorts instead.
Install MacPorts¶
- Make sure you have Xcode installed - http://developer.apple.com/tools/xcode/
- Download and install the .dmg from MacPorts - http://www.macports.org/
Install ruby and rubygems¶
Once MacPorts has been configured, you can install a new version of Ruby and RubyGems with the following command:
$ sudo port install ruby rb-rubygems
This will install ruby into /opt/local/bin/ruby.
You should verify that your PATH is set correctly such that /opt/local/bin is listed before /usr/bin.
$ echo $PATH /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin $ which ruby gem /opt/local/bin/ruby /opt/local/bin/gem
Install a database (optional)¶
Some Metasploit functionality requires a database. We support sqlite3, postgres, and mysql. SQLite is the easiest to set up, but is not as robust as the others.
You can install sqlite3 and the ruby bindings for sqlite with the following commands:
$ sudo port install sqlite3 $ sudo gem install sqlite3-ruby
PostgreSQL:
$ sudo port install postgresql84-server $ sudo gem install pg
mysql:
$ sudo port install mysql5-server $ sudo gem install mysql
Install and use the Framework¶
Once Ruby and RubyGems have been properly installed, download the Unix tarball from the Framework Website and extract it to the directory of your choice. Change into the framework3 directory and execute msfconsole to get started.