微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Centos安装msf与配置

通过msf的安装脚本,

curl https://raw.githubusercontent.com/rapid7/Metasploit-omnibus/master/config/templates/Metasploit-framework-wrappers/msfupdate.erb > msfinstall && \
  chmod 755 msfinstall && \
  ./msfinstall

可以方便的安装msf测试版本,之后我们需要对centos下的数据库进行配置。
查看Postgresql 当前版本

psql -V

没装的话需要使用安装postgresql,这个sql的程序名为psql用户为postgres,通过susu postgres进入数据库后台管理,获取管理员权限可以通过psql -U postgres获取su,更改密码可以使用ALTER USER postgres WITH PASSWORD 'xxxxxx';或者password postgres

sudo yum install -y postgresql-server postgresql
postgresql-setup initdb
sudo systemctl start postgresql
sudo systemctl enable postgresql

数据库进行设置

su                             #切换到root用户
su postgres                    #切换到数据库用户
createuser msf -P -S -R -D     #创建用户提示输入密码
createdb -O msf msf            #创建数据库

删除数据库drop database msf;删除用户drop role msf;查看数据库列表\l,查看用户列表\du,切换数据库\c DatabaseName查看表\d
新建数据库配置文件database.yml,一般我们将它放在.msf/database.yml

production:  
   adapter: postgresql  
   database: msf  
   username: msf  
   password: msf               #上一步创建用户的时候  设置的密码
   host: 127.0.0.1  
   port: 5432  
   pool: 75  
   timeout: 5

参考文献:
postgresql数据库基本用法
PostgreSQL新手入门
Deepin Linux下的Metasploit安装及优化
Centos下安装msf

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐