Operating system: Debian Linux Kernel: Linux debian-gvm 5.10.0-7-amd64 #1 SMP Debian 5.10.40-1 (2021-05-28) x86_64 GNU/Linux Installation method / source: Installation docs: Building GVM 21.04 — Greenbone Documentation documentation
I’m currently at the System Setup stage of building from source according to the documentation. Thanks for previous advice to get me to this stage.
My question is about the following segment of code from the documentation:
You need to follow the guide closely. In your case it seems you either didn’t set INSTALL_DIRECTORY, or the INSTALL_DIRECTORY is not accessible by your current user. Could you please paste the actual error here?
I’m building with ‘root’ user first until I get a good build, then will attempt with non-root user.
Yes, INSTALL_DIR is set.
# echo $INSTALL_DIR
/root/install
I know this because every time I run make -j(nproc) I will find files in the /root/install directory. But when I run
make DESTDIR=$INSTALL_DIR install
sudo cp -rv $INSTALL_DIR/* /
the files don’t install. Then, I end up delete them again with the next command rm -rf $INSTALL_DIR/*
However, when I just run make install instead of make DESTDIR=$INSTALL_DIR install then everything seems to end up in the right place.
All the permission setting commands worked without error after that. Before they would give error
"chmod: cannot access '<filename>': No such file or directory"
Everything else worked fine. Now I’m syncing the feeds, but last time I had problem that the services would not start… The manual says:
Please be aware, even if the systemctl start commands are returning immediately, the first startup of the services may take several minutes or even hours!
At the first start the scanner needs to load all VTs into Redis and gvmd must process the CERT and SCAP data.
So, I’m not sure what will happen? I tried last time but when starting the services I get timeout error.
I don’t understand why you are trying to build with root and afterwards with a non privileged user. Just use an unprivileged user from the beginning. The guide advises this also. You need to be aware that running make can do EVERYTHING on your machine. It’s like running a random script from somewhere in the internet. Restricting the permissions while running make is a good thing!
Nevertheless if you are already root you don’t need to become root via sudo to copy the files into the destination directory of course.
The reason I’m building with root is because I have not had a successful build after 3-4 attempts. So, I want to save some time and try to get it working. So, with root, I can put some parts of the process into a script and save time.
Now I got to the section in the manual to start the service sudo systemctl start ospd-openvas:
SO, I have tried to start the first service. But it will show like below:
# systemctl status ospd-openvas
● ospd-openvas.service - OSPd Wrapper for the OpenVAS Scanner (ospd-openvas)
Loaded: loaded (/etc/systemd/system/ospd-openvas.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) since Thu 2021-12-16 08:37:25 UTC; 2s ago
Docs: man:ospd-openvas(8)
man:openvas(8)
Process: 4019 ExecStart=/usr/local/bin/ospd-openvas --unix-socket /run/ospd/ospd-openvas.sock --pid-file /run/ospd/ospd-openvas.pid --log-file /var/log/gvm/ospd-openvas.log --lock-file>
Main PID: 4021 (code=exited, status=0/SUCCESS)
CPU: 572ms
So, I don’t know is it supposed to be like this? It says Active: activating (auto-restart) (Result: protocol) since Thu 2021-12-16 08:38:26 UTC; 50s ago