Centos7.x更新到最新版后无法直接使用Metasploit的解决方案

首先查看Metasploit的安装位置

[[email protected] ~]# cd /opt/metasploit-framework/bin/

[[email protected] bin]# ls
metasploit-aggregator  msfbinscan  msfconsole  msfd  msfdb  msfelfscan  msfmachscan  msfpescan  msfremove  msfrop  msfrpc  msfrpcd  msfupdate  msfvenom
[[email protected] bin]# pwd

/opt/metasploit-framework/bin

Centos7.x更新到最新版后无法直接使用Metasploit的解决方案

修改环境变量

[[email protected] ~]# vi /etc/profile

在最后添加一行

export PATH="/opt/metasploit-framework/bin:$PATH"

Centos7.x更新到最新版后无法直接使用Metasploit的解决方案

更新环境变量

[[email protected] ~]# source /etc/profile

打开Metasploit控制台

Centos7.x更新到最新版后无法直接使用Metasploit的解决方案

OK了