There’re various instructions on installing OpenVAS, but I found the most efficient solution is OpenVAS and Kali combination. Whenever I tried with some scripts or with a different Linux distro, it always generates errors and hard to fix.
So, just play with Kali as we always have been.
Update Kali
$sudo apt-get update && sudo apt-get upgrade
$sudo apt-get install openvas gvm postgresql-13
Fix existing bug of OpenVAS dependencies in Postresql
sudo vi /etc/postgresql/13/main/postgresql.conf
port = 5433->5432
sudo vi /etc/postgresql/12/main/postgresql.conf
port =5432->54322 (any unused ports)
Restart Postgresql daemon
$sudo systemctl restart postgresql
Populate the OpenVAS database, it will take around 1.5 hour
$sudo gvm-setup
$sudo gvm-check-setup
Allow remote connection
$sudo vi /lib/systemd/system/greenbone-security-assistant.service
ExecStart …… listen=127.0.0.1 ->0.0.0.0
Restart system daemon and interface
$sudo systemctl daemon-relad && sudo systemctl restart greenbone-security-assistant.service
Start OpenVAS (if required)
$sudo gvm-start