how to install metasploit kali linux

Hi, I have Kali Linux App from the App Store on Windows Subsystem for Linux and Windows 10 Host. I also have Kali Linux 2 on VMware but that's not the problem. I'm trying to install Metasploit on the Kali App. I've entered:

sudo su

apt-get -y install build-essential zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev locate libreadline6-dev libcurl4-openssl-dev git-core libssl-dev libyaml-dev openssl autoconf libtool ncurses-dev bison curl wget postgresql postgresql-contrib libpq-dev libapr1 libaprutil1 libsvn1 libpcap-dev

apt-get install git-core postgresql curl ruby1.9.3 nmap gem
gem install wirble sqlite3 bundler

cd /opt
git clone https://github.com/rapid7/metasploit-framework.git


 

cd metasploit-framework
bundle install

./msfconsole

Everything worked fine and Metasploit starts up with no problems. Now I'm trying to setup the database. I enter:

su postgres
createuser msf -P -S -R -D
createdb -O msf msf
exit

I get the error:

createuser: could not connect to database postgres: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

I entered pg_lsclusters and got:

Ver Cluster Port Status Owner Data directory Log file
10 main 5432 down postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log

Does anyone kno what these errors mean so I can creat a user and setup the database? I read a lot online but nothing worked. I'm attaching some screenshots. Please reply. Thanks

MSF Console Database Error.jpg

Metasploit Postgres (Create User) Errors (2).jpg

Comments

Popular posts from this blog

How to trace someone ip and location?

twofi