Before we can begin using Metasploit, we need to install it to our system. Unlike Nmap, installing Metasploit can be a little bit trickier—but it's nothing that a little careful work can't overcome!
The first step is to make sure that all the dependencies that Metasploit requires are installed. To do so is relatively simple, we just need to run sudo apt-get install build-essential libreadline-dev libssl-dev libpq5 libpq-dev libreadline5 libsqlite3-dev libpcap-dev openjdk-7-jre git-core autoconf postgresql pgadmin3 curl zlib1g-dev libxml2-dev libxslt1-dev vncviewer libyaml-dev curl zlib1g-dev
:
As you can see in the preceding screenshot, most Linux machines will need to install several packages from this list that aren't included by default. Don't worry if you don't know what these individual packages do—we just need them installed so that Metasploit can function correctly.
In addition to installing various packages, we need to make sure that we have an up-to-date version...