1:安装ruby
yum -y install ruby
2:根据官方文档执行,安装支持包
yum install xorg-x11-server-Xvfb -y
3:官网下载最新版的Metasploit
https://gist.github.com/appastair/3913714
32位系统
wget http://downloads.metasploit.com/data/releases/metasploit-latest-linux-installer.run
64位系统
wget http://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run
4:然后给文件X权限。
32位系统
chmod +x metasploit-latest-linux-installer.run
64位系统
chmod +x metasploit-latest-linux-x64-installer.run
5:开始安装
32位系统
./metasploit-latest-linux-installer.run
64位系统
./metasploit-latest-linux-x64-installer.run
这里几乎都是下一步下一步的,按回车或y回车继续就可以
检查数据库连接状态db_status 返回如下结果表示数据库已经连接成功
msf > db_status
[*] postgresql connected to msf3
最后请把要监听的端口加入防火墙白名单
/sbin/iptables -I INPUT -p tcp --dport 8081 -j ACCEPT 写入修改
/etc/init.d/iptables save 保存修改
service iptables restart 重启防火墙,修改生效