https://github.com/rapid7/metasploit-framework/wiki/Nightly-Installers
1. sh
yum update
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \
chmod 755 msfinstall && \
./msfinstall
2.yum
[metasploit]
name=Metasploit
baseurl=http://downloads.metasploit.com/data/releases/metasploit-framework/rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Metasploit
enabled=1
yum install metasploit-framework
http://rpm.metasploit.com/
3.postgresql
http://yum.postgresql.org/packages.php
rpm -ivh http://yum.postgresql.org/9.5/redhat/rhel-6-x86_64/pgdg-centos95-9.5-2.noarch.rpm
yum -y install postgresql postgresql-server
/etc/init.d/postgresql-9.X initdb
/etc/init.d/postgresql-9.X initdb