metasploit database setup for archlinux

1. Switch to postgres user

su root
su postgres   

or 

sudo -iu postgres

2. Initialize database cluster


initdb -D '/var/lib/postgres/data'
exit
systemctl start postgresql 

 

3. Create database user

    su root
    su postgres
    createuser msf -P
    createdb --owner=msf msf
    exit 

##remember password in this step u need to connect msf database

4. Database config for metasploit

mkdir ~/.msf4
##cd /opt/metasploit/config/##skip
##cp database.yml.example ~/.msf4/database.yml##skip
sudo vim database.yml

---------------------------------------------------------------------------------'

# To set up a metasploit database, follow the directions hosted at:
# http://r-7.co/MSF-DEV#set-up-postgresql
#
# Kali Linux and the Omnibus installers both include an easy wrapper script for
# managing your database, which may be more convenient than rolling your own.

development: &pgsql
  adapter: postgresql
  database: msf
  username: msf
  password: #passwordsetin #3
  host: localhost
  port: 5432
  pool: 200
  timeout: 5

# You will often want to seperate your databases between dev
# mode and prod mode. Absent a production db, though, defaulting
# to dev is pretty sensible for many developer-users.
production: &production
  <<: *pgsql

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
#
# Note also, sqlite3 is totally unsupported by Metasploit now.
test:
  <<: *pgsql
  database: metasploit_framework_test
  username: metasploit_framework_test
  password: ___________________________

---------------------------------------------------------------------------------

 

src::

https://wiki.archlinux.org/title/PostgreSQL

https://wiki.archlinux.org/title/Metasploit_Framework

Comments

Popular posts from this blog

sxhkd volume andbrightness config for dwm on void

fix idm integration on chrome

Hidden Wiki