Steps
- Get source code, Enter into code directory
1 | git clone git://github.com/rapid7/metasploit-framework.git |
- Install preparation, install Ruby and set it default
1 | yum install yum-utils -y |
- Install rvm
1 | curl -L get.rvm.io | bash -s stable |
- Check output if you have gpg key check error, execute this command
1 | gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 |
- Bundler install
1 | gem install rails |
- Init and start postgresql
1 | postgresql-setup initdb |
- Create postgresql user and database for metasploit
1 | sudo -u postgres -i createuser msfuser -P |
- Config metasploit db
1 | cp config/database.yml.example config/database.yml |
- Edit
database.yml
1 | production: |
- Add config to
/var/lib/pgsql/data/pg_hba.conf
1 | host msfdb msfuser 127.0.0.1/32 md5 |
- Restart postgresql
1 | systemctl restart postgresql.service |
- Start
1 | ./msfconsole |