Any latest GVM version install guide for CentOS 7?

Hello everyone, I currently doing a project for my college project where i need to install GVM on CentOS 7. I already tried this guide from internet

https://howto.lintel.in/installing-openvas-centos-7/
Installing OpenVAS (GVM) on CentOS 7 - Linux Included
CentOS 7 Docker install GVM-11 - Programmer Sought
https://linoxide.com/install-setup-openvas-centos-7/

but all of the article above not working, because I face a lot of problem such as : openvas user not found (even with the solution from this linux - Running openvas-setup - Stack Overflow also not working), and for the additional info I already opened ports 80, 8000, 8080, 9392, 5432, and 443 to make sure that I can access the GVM. so I am really stuck at this moment and really need guide to install latest GVM version on CentOS 7. thanks and much appreciated!

If you are able to run docker, it might be easier than trying to build from source on CentOS.

immauss/openvas (docker.com)

Otherwise, take a look at the build-gvm.sh and start.sh in the github-repo for the above. They could give you an idea on what needs to be setup. I will say though, that getting it setup and running on a Red Hat based distro vs a Debian based distro tends to be a bit more difficult since the devs use Debian. But the easiest by far is to just use the docker container.

-Scott

3 Likes

thank you for the solution Immauss it works really great, but unfortunately, i don’t know how to connect to the GVM from external (such as from my host machine) since the project it self about vulnerability scanner using GVM with python script, thats why i need to connect the python script (with gvm-tools library) to the gvmd.sock inside the docker. i already did that on centos 8 and it works very good, but the requirement of the project is centos 7, so i have to install it on the centos 7, already tried another article which is installing from source code but it keeps getting error one after another.

I’m a little behind on documentation. That was actually requested and added a week or so ago.

  • First, enable the service in the container with -e GMP=<service port number>
  • Then publish the port from the container -p <external port number>:<service port number>
  • Example:
docker run -d -p 9392:9392 -p 9390:9390 -e GMP=9390 --name openvas -v openvas:/data immauss/openvas:latest 

Sorry … I re-read your message and I guess the fact that you specifically stated you wanted to use the socket didn’t’ register. You can still make this work with a little docker magic. Just put all of your scripts in a directory and mount that directory into the container. You can then execute them with docker commands once gmvd gets started.

Example:

Your scripts are in “/home/user/myscripts”

add a volume mount to your docker run command:

docker run -d -v /home/user/myscripts:/mnt --name openvas immauss/openvas:latest

This will put your scripts in the “/mnt” directory.
You could then execute those scripts like so.

docker exec -it openvas /mnt/script-name.py

Make sure you substitute the actual container name where I used openvas here and you should be good to go.

2 Likes

I know that cent os as distro changed.https://arstechnica.com/gadgets/2020/12/centos-shifts-from-red-hat-unbranded-to-red-hat-beta/ I recommend you in production to run distro that will be suported down the road.

sorry for the late reply, Thanks for the help Immauss i really works like a charm, you really helped me a lot, thanks once again

Actually CentOS 7 is still safe for a few years. (30 June 2024). CentOS 8 is another story. You would want to go with CentOS 8 Streams. There is also the Rocky Linux project. (https://rockylinux.org/) which aims to pickup where CentOS left of for 8.

-Scott