Hello,
I would like to install openvas on an external database, to follow the pattern of having a centralized database. I would like to know if it is possible, I searched a lot and could not find this information.
I managed to install using postgresql localhost, but I would like to do this separation.
our software uses a unix domain socket connection to a local postgres database by default. You can adjust the postgresql config to store the database in whatever location you want. The postgres config is out of our business.
Additionally there are options for gvmd to connect to postgres via a TCP socket for using a remote postgres. But this is not a supported setup and your are mostly on your own by using it. See gvmd --help for details about changing the postgres connection related options.
Ive figured out my issue and hope this may help with yours.
Bricks is correct you will need to specify the directory you want in the postgres conf file
You will need to:
Stop the postgresql service
"sudo systemctl stop postgresql"
Point postgres to the new data location in the postgres.conf file
âsudo nano /etc/postgresql/version/main/postgresql.confâ
- edit the âdata directoryâ entry to reflect the external location you want
example: data_directory = â/mnt/volume_nyc1_01/postgresql/10/mainâ
rsync the postgres data library to where you want the data to be held
âsudo rsync -av /var/lib/postgresql /your/destinationâ
change the name of the original data folder lib (you will delete this later once you get the external working)
When you get it working you can either keep or delete the old data dir and if you need to revert changes just edit the postgres conf file back to the original data location.
You want to also double check the permissions and owners of the destination folder and make sure the owner is postgres.
Hope this helps.
I managed to get mine working on a raspberry pi 4 8gb with the database running on a NAS storage.