安装依赖
yum install gpg which libpqxx-devel sqlite-devel libxslt-devel libxml2-devel java-1.7.0-openjdk libpcap-devel nano openssl-devel zlib-devel libffi-devel gdbm-devel readline-devel wget gcc-c++ patch readline zlib bzip2 autoconf automake libtool bison iconv-devel libyaml-devel
安装postgresql数据库
yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum install postgresql10 postgresql10-libs postgresql10-devel
安装rvm,使用rvm安装ruby
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
curl -L get.rvm.io | bash -s stable
#报错看提示运行相关操作或者多尝试几次
source /etc/profile.d/rvm.sh
rvm reload
安装ruby
rvm list known
#列出ruby版本
rvm install ruby-3.0.2
下载metasploit
git clone https://github.com/rapid7/metasploit-framework.git
cd metasploit-framework
gem install bundle
bundle install
添加软连接
ln -s /root/metasploit-framework/msfconsole /usr/bin/msfconsole
如果bundle install运行时报错An error occurred while installing pg (1.4.3), and Bundler cannot continue.

解决办法
安装yum install libpqxx-devel
gem install pg -- --with-pg-config=/usr/pgsql-10/bin/pg_config
或者bundle config build.pg --with-pg-config=/usr/pgsql-10/bin/pg_config
博客主要介绍了Metasploit的安装过程,包括安装依赖、postgresql数据库、rvm和ruby等,还提及下载Metasploit并添加软连接。同时针对bundle install运行报错给出解决办法,如安装yum install libpqxx - devel等。
8万+

被折叠的 条评论
为什么被折叠?



