loading...

How to Install GVM Vulnerability Scanner on Ubuntu 20.04 ?

Install the following dependency packages first.

sudo su -
apt update && \
apt -y dist-upgrade && \
apt -y autoremove && \
apt install -y software-properties-common && \
apt install -y build-essential cmake pkg-config libglib2.0-dev libgpgme-dev libgnutls28-dev uuid-dev libssh-gcrypt-dev libldap2-dev doxygen graphviz libradcli-dev libhiredis-dev libpcap-dev bison libksba-dev libsnmp- dev gcc-mingw-w64 heimdal-dev libpopt-dev xmltoman redis-server xsltproc libical-dev postgresql postgresql-contrib postgresql-server-dev-all gnutls-bin nmap rpm nsis curl wget fakeroot gnupg sshpass socat snmpm smbclihtt gnupg sshpass socat snmpm smbclih dev python3-polib gettext rsync xml-twig-tools python3-paramiko python3-lxml python3-defusedxml python3-pip python3-psutil python3-impacket virtualenv vim git && \
apt install -y texlive-latex-extra --no-install-recommends && \
apt install -y texlive-fonts-recommended && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt update && \
apt -y install yarn && \
yarn install && \
yarn upgrade
Create a GVM user
Paste the following commands into a terminal to create a gvm user that will be used during installation and compilation:
echo 'export PATH = "$ PATH: / opt / gvm / bin: / opt / gvm / sbin: /opt/gvm/.local/bin"' | tee -a /etc/profile.d/gvm.sh && \
chmod 0755 /etc/profile.d/gvm.sh && \
source /etc/profile.d/gvm.sh && \
bash -c 'cat </etc/ld.so.conf.d/gvm.conf
# gmv libs location
/ opt / gvm / lib
EOF '
mkdir / opt / gvm && \
adduser gvm --disabled-password --home / opt / gvm / --no-create-home --gecos '' && \
usermod -aG redis gvm && \
chown gvm: gvm / opt / gvm /
Now login as user gvm.
sudo su - gvm
Download and install the software (GVM)
mkdir src && \
cd src && \
export PKG_CONFIG_PATH = / opt / gvm / lib / pkgconfig: $ PKG_CONFIG_PATH
git clone -b gvm-libs-20.08 --single-branch https://github.com/greenbone/gvm-libs.git && \
git clone -b openvas-20.08 --single-branch https://github.com/greenbone/openvas.git && \
git clone -b gvmd-20.08 --single-branch https://github.com/greenbone/gvmd.git && \
git clone -b master --single-branch https://github.com/greenbone/openvas-smb.git && \
git clone -b gsa-20.08 --single-branch https://github.com/greenbone/gsa.git && \
git clone -b ospd-openvas-20.08 --single-branch https://github.com/greenbone/ospd-openvas.git && \
git clone -b ospd-20.08 --single-branch https://github.com/greenbone/ospd.git
Install gvm-libs (GVM)
In this step, we will compile gvm-lib from github:
cd gvm-libs && \
export PKG_CONFIG_PATH = / opt / gvm / lib / pkgconfig: $ PKG_CONFIG_PATH && \
mkdir build && \
cd build && \
cmake -DCMAKE_INSTALL_PREFIX = / opt / gvm .. && \
make && \
make doc && \
make install && \
cd / opt / gvm / src


1 Comments

Leave a comment