This post is summary from Source. If you want all details, please go to the Source.
1. Install all ruby and packages that we required
- apt-get update && sudo apt-get install ruby libopenssl-ruby libyaml-ruby libdl-ruby libiconv-ruby libpq-dev libpq5 libreadline-ruby irb ri rubygems subversion build-essential ruby-dev libpcap-dev postgresql-8.4 nmap
2. Install pgSQL ruby gem.
- sudo gem install pg
3. Install Metasploit 3
- svn co https://www.metasploit.com/svn/framework3/trunk/ msf
4. Install raw socket extension
- cd /opt/framework3/msf/external/pcaprub
&& sudo ruby extconf.rb &&
sudo make && sudo make installing
5. Install wireless extension
- cd /opt/framework3/msf/external/ruby-lorcon2
- sudo svn co http://802.11ninja.net/svn/lorcon/trunk lorcon2
- cd lorcon2
- sudo ./configure --prefix=/usr && sudo make && sudo make install
- cd ..
- sudo ruby extconf.rb
- sudo make && sudo make install
6. Add metasploit to PATH variable for easy usage.
- ln -sf /opt/framework3/msf/msf* /usr/local/bin
7. Create new database for Metasploit
- su postgres
- createuser msf -P
- create db –owner=msf msf
8. Go to Metasploit Console and connect PostgreSQL.
- msfconsole
- db_driver postgresql
- db_connect msf:msf@127.0.0.1:5432/msf
PS: in this tutorial, we set password to msf. If you create another user or password in another things, please use this form.
user:password@127.0.0.1:5432/msf
Source: https://dangertux.wordpress.com/2011/12/08/installing-metasploit-framework-postgresql-db-backend-under-ubuntu-12-04-lts/
If you like my blog, Please Donate Me