首先启动postgresql服务:
service postgresql start
找到database.yml文件:
find / -name database.yml
cat一下:
回到msfconsole中,db_connect一下:
。。。不管用,可能是配置有什么问题,所以还是quit回到postgresql中新建一个对应账户和密码,顺便改一下数据库名称:
su postgres
新建用户:
createuser msf -P
ceate和user中间没有空格,踩了好多坑
新建数据库,同时指定owner:
createdb --owner=msf msf
再进入msfconsole,重新连接:
成功