Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #
- # Greenbone Community Edition (OpenVAS) – source build for CentOS 9 Stream
- # Based on: https://greenbone.github.io/docs/latest/22.4/source-build/index.html
- #
- # Run as a regular user that has sudo privileges (NOT as root).
- # The script is idempotent-friendly and uses `set -e` to stop on the first error.
- #
- # Usage:
- # chmod +x centos_openvas.sh
- # ./centos_openvas.sh
- #
- # added workarounds to compile openvas-smb also in centos/rocky 9/10, which is not officially supported by Greenbone (upstream only documents Debian/Ubuntu)
- #
- set -euo pipefail
- # ---------------------------------------------------------------------------
- # 0. Sanity checks
- # ---------------------------------------------------------------------------
- if [[ $EUID -eq 0 ]]; then
- echo "ERROR: Do not run this script as root. Run as a regular sudo user." >&2
- exit 1
- fi
- if ! command -v sudo >/dev/null 2>&1; then
- echo "ERROR: sudo is required." >&2
- exit 1
- fi
- if ! grep -qiE "centos|rocky" /etc/os-release; then
- echo "WARNING: This script targets CentOS 9 Stream / Rocky Linux. Continuing anyway in 5s..." >&2
- sleep 5
- fi
- # ---------------------------------------------------------------------------
- # 1. Component versions (pin to versions documented in the 22.4 guide)
- # ---------------------------------------------------------------------------
- export GVM_LIBS_VERSION=22.31.1
- export GVMD_VERSION=26.10.0
- export PG_GVM_VERSION=22.6.9
- export GSA_VERSION=25.0.0
- export GSAD_VERSION=24.3.0
- export OPENVAS_SCANNER_VERSION=23.20.1
- export OSPD_OPENVAS_VERSION=22.9.0
- export OPENVAS_DAEMON=23.20.0
- export OPENVAS_SMB_VERSION=22.5.7
- # openvas-smb is not officially supported on CentOS/Rocky (upstream only
- # documents Debian/Ubuntu). The workaround in section 10c builds its Heimdal
- # Kerberos dependency from source — EL9/EL10 and EPEL do not ship heimdal-devel
- # and MIT krb5 is not a drop-in replacement — then compiles openvas-smb against
- # it to enable Windows / SMB / WMI target scans.
- export HEIMDAL_VERSION=7.8.0
- # ---------------------------------------------------------------------------
- # 2. Environment variables
- # ---------------------------------------------------------------------------
- export INSTALL_PREFIX=/usr/local
- export PATH=$PATH:$INSTALL_PREFIX/sbin
- export SOURCE_DIR=$HOME/source
- export BUILD_DIR=$HOME/build
- export INSTALL_DIR=$HOME/install
- mkdir -p "$SOURCE_DIR" "$BUILD_DIR" "$INSTALL_DIR"
- # ---------------------------------------------------------------------------
- # 3. Create gvm user / group and add current user to it
- # ---------------------------------------------------------------------------
- if ! id -u gvm >/dev/null 2>&1; then
- sudo useradd -r -M -U -G wheel -s /usr/sbin/nologin gvm
- fi
- sudo usermod -aG gvm "$USER"
- # ---------------------------------------------------------------------------
- # 4. Enable required repositories and install common build dependencies
- # ---------------------------------------------------------------------------
- sudo dnf config-manager --set-enabled crb
- # epel-next-release only exists on CentOS Stream; Rocky Linux uses epel-release only
- sudo dnf install -y epel-release
- if dnf info epel-next-release &>/dev/null; then
- sudo dnf install -y epel-next-release
- fi
- sudo dnf upgrade -y
- sudo dnf groupinstall -y 'Development Tools'
- sudo dnf install -y \
- cmake \
- python3-pip \
- tar \
- gcc-c++ \
- doxygen \
- xmltoman \
- curl \
- gnupg2 \
- pkg-config
- # LaTeX / pdflatex and related packages
- sudo dnf install -y \
- texlive \
- texlive-latex \
- texlive-xetex \
- texlive-luatex \
- texlive-collection-latexrecommended \
- texlive-collection-fontsrecommended \
- texlive-dvipng \
- texlive-dvips \
- texlive-makeindex \
- texlive-lm \
- texlive-lm-math \
- latexmk
- sudo tee /etc/ld.so.conf.d/local.conf >/dev/null <<EOF
- /usr/local/lib
- /usr/local/lib64
- EOF
- sudo ldconfig
- # Distro net-snmp conflicts with the source build needed by openvas-scanner
- sudo dnf remove -y net-snmp net-snmp-devel || true
- sudo dnf install -y \
- systemd \
- gcc \
- openssl-devel \
- bzip2-devel \
- elfutils-devel \
- libselinux-devel \
- elfutils-libelf-devel \
- rpm-devel \
- perl-devel \
- procps \
- python3-devel \
- python3-setuptools \
- chrpath \
- mariadb-connector-c-devel
- # Build net-snmp from source (5.9.4 – fixes swrun linker bug present in 5.9.1)
- if [[ ! -x /usr/local/sbin/snmpd ]]; then
- cd "$SOURCE_DIR"
- curl -fL -o net-snmp-5.9.4.tar.gz \
- https://sourceforge.net/projects/net-snmp/files/net-snmp/5.9.4/net-snmp-5.9.4.tar.gz/download
- tar xzf net-snmp-5.9.4.tar.gz
- cd net-snmp-5.9.4
- ./configure --prefix=/usr/local \
- --with-default-snmp-version=3 \
- --with-sys-contact="root@localhost" \
- --with-sys-location="Unknown" \
- --with-logfile="/var/log/snmpd.log" \
- --with-persistent-directory="/var/net-snmp"
- make -j"$(nproc)"
- sudo make install
- sudo ldconfig
- fi
- # Build paho.mqtt.c from source (required by gvm-libs on CentOS)
- if [[ ! -f /usr/local/lib/libpaho-mqtt3c.so ]] && [[ ! -f /usr/local/lib64/libpaho-mqtt3c.so ]]; then
- cd "$SOURCE_DIR"
- curl -fL -o paho.mqtt.c.tar.gz \
- https://codeload.github.com/eclipse/paho.mqtt.c/tar.gz/refs/tags/v1.3.10
- tar xzf paho.mqtt.c.tar.gz
- cd paho.mqtt.c-1.3.10
- mkdir -p build && cd build
- cmake -DPAHO_WITH_SSL=TRUE -DPAHO_ENABLE_TESTING=FALSE ..
- make -j"$(nproc)"
- sudo make install
- sudo ldconfig
- fi
- # Install curl-devel so that libcurl.pc is present for pkg-config/CMake.
- # This is needed even when the system libcurl is new enough to skip the
- # source build below, otherwise downstream cmake steps fail with
- # "Package 'libcurl', required by 'virtual:world', not found".
- sudo dnf install -y curl-devel
- # Build libcurl from source only when the system version is < 7.83.0.
- # Check pkg-config first; fall back to parsing `curl --version` when the
- # libcurl .pc file is not yet installed (e.g. on Rocky Linux 10 before
- # curl-devel is present). This prevents overwriting a newer system libcurl
- # (Rocky Linux 10 ships 8.9+) with an older source build, which would break
- # the system curl binary with an undefined-symbol error.
- _libcurl_ok=false
- if pkg-config --atleast-version=7.83.0 libcurl 2>/dev/null; then
- _libcurl_ok=true
- elif _cv=$(curl --version 2>/dev/null | awk 'NR==1{print $2}') && \
- [[ -n "$_cv" ]] && \
- printf '%s\n%s\n' "7.83.0" "$_cv" | sort -V -C 2>/dev/null; then
- _libcurl_ok=true
- fi
- if ! $_libcurl_ok; then
- cd "$SOURCE_DIR"
- CURL_VERSION=8.7.1
- curl -fL -o "curl-${CURL_VERSION}.tar.gz" \
- "https://curl.se/download/curl-${CURL_VERSION}.tar.gz"
- tar xzf "curl-${CURL_VERSION}.tar.gz"
- cd "curl-${CURL_VERSION}"
- ./configure --prefix=/usr/local --with-openssl --without-libpsl
- make -j"$(nproc)"
- sudo make install
- sudo ldconfig
- fi
- # Ensure pkg-config finds source-built libraries before system ones
- export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
- # ---------------------------------------------------------------------------
- # 5. Import the Greenbone Community signing key
- # ---------------------------------------------------------------------------
- curl -fL https://www.greenbone.net/GBCommunitySigningKey.asc -o /tmp/GBCommunitySigningKey.asc
- gpg --import /tmp/GBCommunitySigningKey.asc || true
- echo "8AE4BE429B60A59B311C2E739823FAA60ED1E580:6:" | gpg --import-ownertrust
- # Helper: download + verify + extract a tarball
- fetch_and_verify() {
- local name="$1" # repo name, e.g. gvm-libs
- local version="$2"
- local asc_basename="${3:-${name}-${version}.tar.gz.asc}" # some assets prefix with v
- local tgz="$SOURCE_DIR/${name}-${version}.tar.gz"
- local asc="$SOURCE_DIR/${name}-${version}.tar.gz.asc"
- curl -fL "https://github.com/greenbone/${name}/archive/refs/tags/v${version}.tar.gz" -o "$tgz"
- curl -fL "https://github.com/greenbone/${name}/releases/download/v${version}/${asc_basename}" -o "$asc"
- gpg --verify "$asc" "$tgz"
- tar -C "$SOURCE_DIR" -xzf "$tgz"
- }
- # ---------------------------------------------------------------------------
- # 6. gvm-libs
- # ---------------------------------------------------------------------------
- sudo dnf install -y \
- cjson-devel \
- glib2-devel \
- gnutls-devel \
- gpgme-devel \
- hiredis-devel \
- libgcrypt-devel \
- libnet-devel \
- libpcap-devel \
- libssh-devel \
- libuuid-devel \
- libxml2-devel \
- uuid-devel \
- openldap-devel \
- radcli-devel
- fetch_and_verify gvm-libs "$GVM_LIBS_VERSION" "gvm-libs-${GVM_LIBS_VERSION}.tar.gz.asc"
- mkdir -p "$BUILD_DIR/gvm-libs"
- cmake \
- -S "$SOURCE_DIR/gvm-libs-$GVM_LIBS_VERSION" \
- -B "$BUILD_DIR/gvm-libs" \
- -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
- -DCMAKE_BUILD_TYPE=Release \
- -DSYSCONFDIR=/etc \
- -DLOCALSTATEDIR=/var
- cmake --build "$BUILD_DIR/gvm-libs" -j"$(nproc)"
- mkdir -p "$INSTALL_DIR/gvm-libs"
- make -C "$BUILD_DIR/gvm-libs" DESTDIR="$INSTALL_DIR/gvm-libs" install
- sudo cp -rv "$INSTALL_DIR/gvm-libs/"* /
- sudo ldconfig
- # ---------------------------------------------------------------------------
- # 7. gvmd
- # ---------------------------------------------------------------------------
- sudo dnf install -y \
- glib2-devel \
- gnutls-devel \
- postgresql-server-devel \
- libical-devel \
- libxslt \
- rsync \
- libbsd-devel \
- gpgme-devel
- # gvmd expects Debian-style <postgresql/libpq-fe.h> but CentOS puts headers
- # directly under /usr/include. Create a compat symlink directory.
- if [[ ! -d /usr/include/postgresql ]]; then
- sudo mkdir -p /usr/include/postgresql
- for f in /usr/include/libpq-fe.h /usr/include/libpq-events.h \
- /usr/include/postgres_ext.h /usr/include/pg_config.h \
- /usr/include/pg_config_ext.h /usr/include/pg_config_manual.h; do
- [ -f "$f" ] && sudo ln -sf "$f" /usr/include/postgresql/
- done
- [ -d /usr/include/libpq ] && sudo ln -sfn /usr/include/libpq /usr/include/postgresql/libpq
- fi
- # Optional helpers (report formats, alerts, etc.)
- sudo dnf install -y --setopt=install_weak_deps=False \
- gnupg2-smime \
- openssh-clients \
- xmlstarlet \
- zip \
- rpm \
- fakeroot \
- dpkg \
- gnupg \
- wget \
- sshpass \
- socat \
- samba-client \
- python3-lxml \
- gnutls-utils || true
- fetch_and_verify gvmd "$GVMD_VERSION" "gvmd-${GVMD_VERSION}.tar.gz.asc"
- # CentOS puts the server-side pg_config.h (which contains PG_VERSION) under
- # /usr/include/pgsql/server. Point FindPostgreSQL there so the version regex
- # in gvmd's CMakeLists.txt succeeds.
- GVMD_PG_INCLUDEDIR=$(pg_config --includedir 2>/dev/null || echo /usr/include)
- GVMD_PG_SERVER_INCLUDEDIR=$(pg_config --includedir-server 2>/dev/null || echo /usr/include/pgsql/server)
- GVMD_PG_LIBDIR=$(pg_config --libdir 2>/dev/null || echo /usr/lib64)
- mkdir -p "$BUILD_DIR/gvmd"
- cmake \
- -S "$SOURCE_DIR/gvmd-$GVMD_VERSION" \
- -B "$BUILD_DIR/gvmd" \
- -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
- -DCMAKE_BUILD_TYPE=Release \
- -DLOCALSTATEDIR=/var \
- -DSYSCONFDIR=/etc \
- -DGVM_DATA_DIR=/var \
- -DGVM_LOG_DIR=/var/log/gvm \
- -DGVMD_RUN_DIR=/run/gvmd \
- -DOPENVAS_DEFAULT_SOCKET=/run/ospd/ospd-openvas.sock \
- -DGVM_FEED_LOCK_PATH=/var/lib/gvm/feed-update.lock \
- -DLOGROTATE_DIR=/etc/logrotate.d \
- -DPostgreSQL_INCLUDE_DIR="$GVMD_PG_INCLUDEDIR" \
- -DPostgreSQL_TYPE_INCLUDE_DIR="$GVMD_PG_SERVER_INCLUDEDIR" \
- -DPostgreSQL_LIBRARY_DIR="$GVMD_PG_LIBDIR"
- cmake --build "$BUILD_DIR/gvmd" -j"$(nproc)"
- mkdir -p "$INSTALL_DIR/gvmd"
- make -C "$BUILD_DIR/gvmd" DESTDIR="$INSTALL_DIR/gvmd" install
- sudo cp -rv "$INSTALL_DIR/gvmd/"* /
- # ---------------------------------------------------------------------------
- # 8. pg-gvm
- # ---------------------------------------------------------------------------
- sudo dnf install -y \
- glib2-devel \
- gnutls-devel \
- libical-devel \
- postgresql-server-devel
- fetch_and_verify pg-gvm "$PG_GVM_VERSION" "pg-gvm-${PG_GVM_VERSION}.tar.gz.asc"
- # Help CMake's FindPostgreSQL locate the server headers (pg_config.h holds the
- # version string) which live under /usr/include/pgsql/server on CentOS.
- PG_INCLUDEDIR=$(pg_config --includedir 2>/dev/null || echo /usr/include)
- PG_SERVER_INCLUDEDIR=$(pg_config --includedir-server 2>/dev/null || echo /usr/include/pgsql/server)
- PG_LIBDIR=$(pg_config --libdir 2>/dev/null || echo /usr/lib64)
- mkdir -p "$BUILD_DIR/pg-gvm"
- cmake \
- -S "$SOURCE_DIR/pg-gvm-$PG_GVM_VERSION" \
- -B "$BUILD_DIR/pg-gvm" \
- -DCMAKE_BUILD_TYPE=Release \
- -DPostgreSQL_INCLUDE_DIR="$PG_INCLUDEDIR" \
- -DPostgreSQL_TYPE_INCLUDE_DIR="$PG_SERVER_INCLUDEDIR" \
- -DPostgreSQL_LIBRARY_DIR="$PG_LIBDIR"
- cmake --build "$BUILD_DIR/pg-gvm" -j"$(nproc)"
- mkdir -p "$INSTALL_DIR/pg-gvm"
- make -C "$BUILD_DIR/pg-gvm" DESTDIR="$INSTALL_DIR/pg-gvm" install
- sudo cp -rv "$INSTALL_DIR/pg-gvm/"* /
- # ---------------------------------------------------------------------------
- # 9. GSA (web app, pre-built distributable)
- # ---------------------------------------------------------------------------
- curl -fL \
- "https://github.com/greenbone/gsa/releases/download/v${GSA_VERSION}/gsa-dist-${GSA_VERSION}.tar.gz" \
- -o "$SOURCE_DIR/gsa-${GSA_VERSION}.tar.gz"
- curl -fL \
- "https://github.com/greenbone/gsa/releases/download/v${GSA_VERSION}/gsa-dist-${GSA_VERSION}.tar.gz.asc" \
- -o "$SOURCE_DIR/gsa-${GSA_VERSION}.tar.gz.asc"
- gpg --verify "$SOURCE_DIR/gsa-${GSA_VERSION}.tar.gz.asc" "$SOURCE_DIR/gsa-${GSA_VERSION}.tar.gz"
- mkdir -p "$SOURCE_DIR/gsa-${GSA_VERSION}"
- tar -C "$SOURCE_DIR/gsa-${GSA_VERSION}" -xzf "$SOURCE_DIR/gsa-${GSA_VERSION}.tar.gz"
- sudo mkdir -p "$INSTALL_PREFIX/share/gvm/gsad/web/"
- sudo cp -rv "$SOURCE_DIR/gsa-${GSA_VERSION}/"* "$INSTALL_PREFIX/share/gvm/gsad/web/"
- # ---------------------------------------------------------------------------
- # 10. gsad (web server)
- # ---------------------------------------------------------------------------
- sudo dnf install -y \
- glib2-devel \
- gnutls-devel \
- libmicrohttpd-devel \
- libxml2-devel
- # Open the GSA port in firewalld if it is running
- if systemctl is-active --quiet firewalld; then
- sudo firewall-cmd --add-port=9392/tcp
- sudo firewall-cmd --runtime-to-permanent
- fi
- fetch_and_verify gsad "$GSAD_VERSION" "gsad-${GSAD_VERSION}.tar.gz.asc"
- mkdir -p "$BUILD_DIR/gsad"
- cmake \
- -S "$SOURCE_DIR/gsad-$GSAD_VERSION" \
- -B "$BUILD_DIR/gsad" \
- -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
- -DCMAKE_BUILD_TYPE=Release \
- -DSYSCONFDIR=/etc \
- -DLOCALSTATEDIR=/var \
- -DGVMD_RUN_DIR=/run/gvmd \
- -DGSAD_RUN_DIR=/run/gsad \
- -DGVM_LOG_DIR=/var/log/gvm \
- -DLOGROTATE_DIR=/etc/logrotate.d
- cmake --build "$BUILD_DIR/gsad" -j"$(nproc)"
- mkdir -p "$INSTALL_DIR/gsad"
- make -C "$BUILD_DIR/gsad" DESTDIR="$INSTALL_DIR/gsad" install
- sudo cp -rv "$INSTALL_DIR/gsad/"* /
- # ---------------------------------------------------------------------------
- # 10c. openvas-smb (Windows / SMB / WMI support) — CentOS/Rocky workaround
- # ---------------------------------------------------------------------------
- # openvas-smb is only officially supported on Debian/Ubuntu because it needs
- # Heimdal Kerberos (heimdal-devel), which EL9/EL10 and EPEL do not package.
- # MIT krb5 is NOT a drop-in replacement — openvas-smb links Heimdal's GSSAPI
- # stack specifically. The workaround: build Heimdal from source into an
- # isolated prefix (/opt/heimdal) and point openvas-smb's build at it.
- #
- # This must run BEFORE openvas-scanner so the scanner detects and links the
- # WMI/SMB client libraries (libopenvas_wmiclient) it needs for Windows scans.
- sudo dnf install -y \
- gnutls-devel \
- glib2-devel \
- popt-devel \
- libunistring-devel \
- perl \
- perl-JSON \
- flex \
- bison \
- texinfo \
- ncurses-devel \
- readline-devel \
- libxcrypt-devel \
- gmp-devel \
- gcc \
- gcc-c++ \
- make
- # --- Build Heimdal from source (only if not already installed) -------------
- export HEIMDAL_PREFIX=/opt/heimdal
- if [[ ! -f "$HEIMDAL_PREFIX/include/gssapi.h" ]]; then
- cd "$SOURCE_DIR"
- curl -fL -o "heimdal-${HEIMDAL_VERSION}.tar.gz" \
- "https://github.com/heimdal/heimdal/releases/download/heimdal-${HEIMDAL_VERSION}/heimdal-${HEIMDAL_VERSION}.tar.gz"
- # Always start from a pristine tree — a previous failed build leaves stale
- # objects and a config.status that would otherwise be reused, so new
- # configure flags below would not take effect on a re-run.
- rm -rf "heimdal-${HEIMDAL_VERSION}"
- tar xzf "heimdal-${HEIMDAL_VERSION}.tar.gz"
- cd "heimdal-${HEIMDAL_VERSION}"
- # --disable-otp / --disable-afs-support drop optional deps; the GSSAPI and
- # krb5 client libraries that openvas-smb links against are still built.
- #
- # LIBS=-lcrypt: on EL10 (glibc >= 2.38) crypt() was removed from glibc and
- # now lives in libxcrypt. Heimdal's libroken uses crypt() but does not add
- # -lcrypt, causing "undefined reference to `crypt'" at link time. Forcing
- # -lcrypt into LIBS makes libroken and its test programs link.
- #
- # POSIX_GETPWNAM_R: Heimdal's runtime configure check for a POSIX
- # getpwnam_r returns "no" in minimal build environments, leaving
- # POSIX_GETPWNAM_R undefined. libkrb5 then references the roken wrapper
- # rk_getpwnam_r, which getpwnam_r.c never compiles -> "undefined reference
- # to `rk_getpwnam_r'". glibc's getpwnam_r IS POSIX, so we both force the
- # configure cache result AND define the macro via CPPFLAGS. The CPPFLAGS
- # define is the reliable part: it makes roken.h alias rk_getpwnam_r
- # directly to glibc's getpwnam_r, so the wrapper symbol is never emitted.
- ./configure \
- --prefix="$HEIMDAL_PREFIX" \
- --disable-otp \
- --without-x \
- --disable-afs-support \
- --disable-heimdal-documentation \
- ac_cv_func_getpwnam_r_posix=yes \
- CPPFLAGS="-DPOSIX_GETPWNAM_R=1" \
- LIBS=-lcrypt
- make -j"$(nproc)"
- sudo make install
- fi
- # Make the Heimdal libraries discoverable at build and run time.
- sudo tee /etc/ld.so.conf.d/heimdal.conf >/dev/null <<EOF
- $HEIMDAL_PREFIX/lib
- EOF
- sudo ldconfig
- # openvas-smb's bundled samba includes Heimdal headers as <heimdal/gssapi/gssapi.h>
- # but Heimdal installs them without that prefix (e.g. <gssapi/gssapi.h>).
- # Create a compat shim: /opt/heimdal-compat/heimdal -> $HEIMDAL_PREFIX/include
- # so that both <heimdal/xxx.h> and <xxx.h> forms resolve correctly.
- HEIMDAL_COMPAT=/opt/heimdal-compat
- sudo mkdir -p "$HEIMDAL_COMPAT"
- sudo ln -sfn "$HEIMDAL_PREFIX/include" "$HEIMDAL_COMPAT/heimdal"
- # Expose Heimdal's pkg-config metadata NOW so that the openvas-smb cmake step
- # below can find heimdal-gssapi.pc. Must come before cmake, not after.
- export PKG_CONFIG_PATH=$HEIMDAL_PREFIX/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
- # Rocky/RHEL 9 ships a gnutls.pc whose linker flags reference a build-time-only
- # static archive path (/builddir/build/BUILD/gnutls-*/bundled_gmp/.libs/libgmp.a).
- # openvas-smb's top-level CMakeLists does `pkg_check_modules(GNUTLS ...)`, so
- # pkg-config passes that absolute path straight into GNUTLS_LIBRARIES and the
- # link line for libopenvas_wmiclient. Since that .a does not exist on the build
- # host, make fails with "No rule to make target .../libgmp.a". Rocky 10's
- # gnutls.pc does not carry this path, which is why the build only breaks on 9.
- # Fix: write a sanitized copy of gnutls.pc (bad path -> -lgmp) into a private
- # dir and prepend it to PKG_CONFIG_PATH so the openvas-smb build picks it up.
- GNUTLS_PC_OVERRIDE_DIR=
- _gnutls_pc_dir="$(pkg-config --variable=pcfiledir gnutls 2>/dev/null || true)"
- _gnutls_pc="${_gnutls_pc_dir:-}/gnutls.pc"
- if [[ -f "$_gnutls_pc" ]] && grep -q '/builddir/build/BUILD/' "$_gnutls_pc"; then
- GNUTLS_PC_OVERRIDE_DIR="$BUILD_DIR/openvas-smb-pcfix"
- mkdir -p "$GNUTLS_PC_OVERRIDE_DIR"
- # Drop the transient -L search path and rewrite the absolute libgmp.a
- # reference to a normal -lgmp so the system libgmp (gmp-devel) is used.
- sed -E \
- -e 's#-L/builddir/build/BUILD/[^[:space:]]*##g' \
- -e 's#/builddir/build/BUILD/[^[:space:]]*/libgmp\.a#-lgmp#g' \
- "$_gnutls_pc" > "$GNUTLS_PC_OVERRIDE_DIR/gnutls.pc"
- export PKG_CONFIG_PATH="$GNUTLS_PC_OVERRIDE_DIR${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
- fi
- fetch_and_verify openvas-smb "$OPENVAS_SMB_VERSION" "openvas-smb-v${OPENVAS_SMB_VERSION}.tar.gz.asc"
- # openvas-smb 22.5.7 vendors an old Samba snapshot whose send-to-KDC callback
- # smb_krb5_send_and_recv_func() uses the 5-argument krb5_send_to_kdc_func
- # signature. Heimdal 7.8.0's typedef adds a `time_t timeout` parameter between
- # the krb5_krbhst_info* and the send buffer, so krb5_set_send_to_kdc_func()
- # fails with "incompatible pointer type" — which GCC 14 on EL10 treats as a
- # hard error, not a warning. Patch the callback to take the (unused) timeout
- # argument so its type matches Heimdal 7.8.0. The signature appears in three
- # places — the definition (krb5_init_context.c) and two prototypes
- # (krb5_init_context.h and proto.h) — all of which must match or the compiler
- # reports "conflicting types". Idempotent: only patches once.
- SMB_KRB5_SRC="$SOURCE_DIR/openvas-smb-$OPENVAS_SMB_VERSION/samba/auth/kerberos"
- for _smb_krb5_f in \
- "$SMB_KRB5_SRC/krb5_init_context.c" \
- "$SMB_KRB5_SRC/krb5_init_context.h" \
- "$SMB_KRB5_SRC/proto.h"; do
- if ! grep -q 'time_t timeout, const krb5_data \*send_buf' "$_smb_krb5_f"; then
- sed -i 's/const krb5_data \*send_buf,/time_t timeout, const krb5_data *send_buf,/' "$_smb_krb5_f"
- fi
- done
- # Point CMake / pkg-config / linker at the isolated Heimdal prefix so the
- # openvas-smb build finds Heimdal's headers and libraries instead of MIT krb5.
- #
- # -include gssapi/gssapi_krb5.h: The bundled samba code in openvas-smb calls
- # Heimdal GSSAPI krb5 extension functions (gss_krb5_import_cred,
- # gss_krb5_copy_ccache) but some source files (credentials_krb5.c) never
- # include <gssapi/gssapi_krb5.h> where they are declared — causing "implicit
- # declaration of function" errors. Using -include force-includes that header
- # at the top of every translation unit so all GSSAPI krb5 symbols are visible.
- #
- # -Wno-error=incompatible-pointer-types (and friends): GCC 14 (EL10's default
- # compiler) promoted several formerly-warning diagnostics to hard errors by
- # default — incompatible-pointer-types, implicit-function-declaration,
- # int-conversion and implicit-int. The old Samba snapshot vendored by
- # openvas-smb 22.5.7 trips these in many places (e.g. the DCOM vtable
- # initializers in lib/com/classes/simple.c whose _send members intentionally
- # use loosely-typed function pointers). These are long-standing constructs that
- # older compilers accepted as warnings, so demote them back to warnings for
- # this package instead of patching hundreds of call sites.
- # A previous configure may have cached the bad libgmp.a path; start clean so
- # the sanitized gnutls.pc above is actually picked up.
- if [[ -f "$BUILD_DIR/openvas-smb/CMakeCache.txt" ]]; then
- rm -rf "$BUILD_DIR/openvas-smb"
- fi
- mkdir -p "$BUILD_DIR/openvas-smb"
- cmake \
- -S "$SOURCE_DIR/openvas-smb-$OPENVAS_SMB_VERSION" \
- -B "$BUILD_DIR/openvas-smb" \
- -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_PREFIX_PATH="$HEIMDAL_PREFIX" \
- -DCMAKE_LIBRARY_PATH="$HEIMDAL_PREFIX/lib" \
- -DCMAKE_C_FLAGS="-I$HEIMDAL_COMPAT -I$HEIMDAL_PREFIX/include -include gssapi/gssapi_krb5.h -D_GNU_SOURCE -Wno-error=incompatible-pointer-types -Wno-error=implicit-function-declaration -Wno-error=int-conversion -Wno-error=implicit-int" \
- -DKRB5_CONFIG="$HEIMDAL_PREFIX/bin/krb5-config"
- cmake --build "$BUILD_DIR/openvas-smb" -j"$(nproc)"
- mkdir -p "$INSTALL_DIR/openvas-smb"
- make -C "$BUILD_DIR/openvas-smb" DESTDIR="$INSTALL_DIR/openvas-smb" install
- sudo cp -rv "$INSTALL_DIR/openvas-smb/"* /
- sudo ldconfig
- # Expose openvas-smb's installed pkg-config data (libopenvas_wmiclient) so the
- # openvas-scanner cmake build below can detect and link WMI/SMB support.
- # $INSTALL_PREFIX/lib/pkgconfig was already added earlier; re-export to ensure
- # it is first in the path in case it was prepended differently above.
- export PKG_CONFIG_PATH=$INSTALL_PREFIX/lib/pkgconfig:$INSTALL_PREFIX/lib64/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
- # ---------------------------------------------------------------------------
- # 11. openvas-scanner
- # ---------------------------------------------------------------------------
- sudo dnf install -y \
- bison \
- glib2-devel \
- gnutls-devel \
- libgcrypt-devel \
- libpcap-devel \
- gpgme-devel \
- libksba-devel \
- rsync \
- nmap \
- json-glib-devel \
- libcurl-devel \
- libbsd-devel \
- krb5-devel
- fetch_and_verify openvas-scanner "$OPENVAS_SCANNER_VERSION" "openvas-scanner-v${OPENVAS_SCANNER_VERSION}.tar.gz.asc"
- mkdir -p "$BUILD_DIR/openvas-scanner"
- cmake \
- -S "$SOURCE_DIR/openvas-scanner-$OPENVAS_SCANNER_VERSION" \
- -B "$BUILD_DIR/openvas-scanner" \
- -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
- -DCMAKE_BUILD_TYPE=Release \
- -DSYSCONFDIR=/etc \
- -DLOCALSTATEDIR=/var \
- -DOPENVAS_FEED_LOCK_PATH=/var/lib/openvas/feed-update.lock \
- -DOPENVAS_RUN_DIR=/run/ospd
- cmake --build "$BUILD_DIR/openvas-scanner" -j"$(nproc)"
- mkdir -p "$INSTALL_DIR/openvas-scanner"
- make -C "$BUILD_DIR/openvas-scanner" DESTDIR="$INSTALL_DIR/openvas-scanner" install
- sudo cp -rv "$INSTALL_DIR/openvas-scanner/"* /
- sudo mkdir -p /etc/openvas
- printf "table_driven_lsc = yes\n" | sudo tee /etc/openvas/openvas.conf
- printf "openvasd_server = http://127.0.0.1:3000\n" | sudo tee -a /etc/openvas/openvas.conf
- # Tell openvas/ospd-openvas where the Redis knowledge-base socket lives, matching
- # the unixsocket path in redis-openvas.conf. Without this the scanner cannot
- # connect to the KB ("Not possible to connect to the kb").
- printf "db_address = /run/redis-openvas/redis.sock\n" | sudo tee -a /etc/openvas/openvas.conf
- # ---------------------------------------------------------------------------
- # 12. ospd-openvas
- # ---------------------------------------------------------------------------
- sudo dnf install -y \
- python3 \
- python3-pip \
- python3-setuptools \
- python3-packaging \
- python3-wrapt \
- python3-cffi \
- python3-psutil \
- python3-lxml \
- python3-defusedxml \
- python3-paramiko \
- python3-redis \
- python3-gnupg \
- python3-wheel
- fetch_and_verify ospd-openvas "$OSPD_OPENVAS_VERSION" "ospd-openvas-v${OSPD_OPENVAS_VERSION}.tar.gz.asc"
- mkdir -p "$INSTALL_DIR/ospd-openvas"
- cd "$SOURCE_DIR/ospd-openvas-$OSPD_OPENVAS_VERSION"
- python3 -m pip install --root="$INSTALL_DIR/ospd-openvas" --ignore-installed --no-warn-script-location .
- sudo cp -rv "$INSTALL_DIR/ospd-openvas/"* /
- # ---------------------------------------------------------------------------
- # 13. openvasd (Rust)
- # ---------------------------------------------------------------------------
- # perl-FindBin / perl-core are required so the build does not fail parsing
- # perl scripts; pkg-config + openssl-devel let openssl-sys link the system
- # OpenSSL instead of compiling a vendored copy from source.
- sudo dnf install -y pkg-config openssl-devel perl-FindBin perl-core perl-IPC-Cmd
- # Default CentOS Rust is too old — install rustup for the current user
- if ! command -v rustup >/dev/null 2>&1; then
- curl -fsSL --proto '=https' --tlsv1.2 https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
- fi
- # shellcheck source=/dev/null
- source "$HOME/.cargo/env"
- rustup update stable
- # Reuse already extracted openvas-scanner sources if version matches; otherwise download
- if [[ "$OPENVAS_SCANNER_VERSION" != "$OPENVAS_DAEMON" ]]; then
- fetch_and_verify openvas-scanner "$OPENVAS_DAEMON" "openvas-scanner-v${OPENVAS_DAEMON}.tar.gz.asc"
- fi
- # Force openssl-sys to use the system OpenSSL (openssl-devel) rather than
- # building a vendored copy from source, which avoids the perl/FindBin build path.
- export OPENSSL_NO_VENDOR=1
- export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/share/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
- mkdir -p "$INSTALL_DIR/openvasd/usr/local/bin"
- cd "$SOURCE_DIR/openvas-scanner-$OPENVAS_DAEMON/rust"
- make || true
- cargo build --release
- sudo cp -v target/release/openvasd "$INSTALL_DIR/openvasd/usr/local/bin/"
- sudo cp -v target/release/scannerctl "$INSTALL_DIR/openvasd/usr/local/bin/"
- sudo cp -rv "$INSTALL_DIR/openvasd/"* /
- # ---------------------------------------------------------------------------
- # 14. greenbone-feed-sync
- # ---------------------------------------------------------------------------
- mkdir -p "$INSTALL_DIR/greenbone-feed-sync"
- python3 -m pip install --root="$INSTALL_DIR/greenbone-feed-sync" \
- --ignore-installed --no-warn-script-location greenbone-feed-sync
- sudo cp -rv "$INSTALL_DIR/greenbone-feed-sync/"* /
- # ---------------------------------------------------------------------------
- # 15. gvm-tools
- # ---------------------------------------------------------------------------
- mkdir -p "$INSTALL_DIR/gvm-tools"
- python3 -m pip install --root="$INSTALL_DIR/gvm-tools" \
- --ignore-installed --no-warn-script-location gvm-tools
- sudo cp -rv "$INSTALL_DIR/gvm-tools/"* /
- # ===========================================================================
- # SYSTEM SETUP
- # ===========================================================================
- # ---------------------------------------------------------------------------
- # 16. Redis with openvas configuration
- # ---------------------------------------------------------------------------
- sudo dnf install -y policycoreutils-python-utils
- # Build Redis from source — avoids modular filtering issues on EL10
- if ! command -v redis-server >/dev/null 2>&1; then
- REDIS_VERSION=7.2.5
- cd "$SOURCE_DIR"
- curl -fL -o "redis-${REDIS_VERSION}.tar.gz" \
- "https://download.redis.io/releases/redis-${REDIS_VERSION}.tar.gz"
- tar xzf "redis-${REDIS_VERSION}.tar.gz"
- cd "redis-${REDIS_VERSION}"
- make -j"$(nproc)" BUILD_TLS=yes
- sudo make PREFIX=/usr/local install
- # Create redis user/group if missing
- if ! id -u redis >/dev/null 2>&1; then
- sudo useradd -r -M -s /sbin/nologin redis
- fi
- sudo mkdir -p /etc/redis /var/lib/redis /var/log/redis
- sudo chown redis:redis /var/lib/redis /var/log/redis
- fi
- # /var/run is a symlink to /run on modern systemd — use /run to avoid the
- # equivalency-rule conflict that semanage raises.
- sudo semanage fcontext -a -f a -t redis_var_run_t -r s0 \
- '/run/redis-openvas(/.*)?' || true
- sudo tee /etc/tmpfiles.d/redis-openvas.conf >/dev/null <<'EOF'
- d /var/lib/redis/openvas 0750 redis redis - -
- z /var/lib/redis/openvas 0750 redis redis - -
- d /run/redis-openvas 0750 redis redis - -
- z /run/redis-openvas 0750 redis redis - -
- EOF
- sudo systemd-tmpfiles --create
- sudo tee /etc/systemd/system/[email protected] >/dev/null <<'EOF'
- [Unit]
- Description=Redis persistent key-value database
- After=network.target
- After=network-online.target
- Wants=network-online.target
- [Service]
- WorkingDirectory=/var/lib/redis/%i
- # Type=simple: source-built Redis has no libsystemd linkage so it cannot
- # send sd_notify; Type=notify would time out waiting for READY=1.
- Type=simple
- ExecStart=/usr/local/bin/redis-server /etc/redis/redis-%i.conf --daemonize no
- ExecStop=/usr/local/bin/redis-cli -s /run/redis-%i/redis.sock shutdown nosave
- User=redis
- Group=redis
- RuntimeDirectory=%i
- RuntimeDirectoryMode=0755
- [Install]
- WantedBy=multi-user.target
- EOF
- sudo cp "$SOURCE_DIR/openvas-scanner-$OPENVAS_SCANNER_VERSION/config/redis-openvas.conf" /etc/redis/
- sudo chown redis:redis /etc/redis/redis-openvas.conf
- sudo systemctl daemon-reload
- sudo systemctl enable --now [email protected]
- sudo usermod -aG redis gvm
- # ---------------------------------------------------------------------------
- # 17. Directory permissions
- # ---------------------------------------------------------------------------
- sudo mkdir -p /var/lib/notus /run/gvmd /var/lib/gvm /var/lib/openvas /var/log/gvm
- sudo chown -R gvm:gvm /var/lib/gvm
- sudo chown -R gvm:gvm /var/lib/openvas
- sudo chown -R gvm:gvm /var/lib/notus
- sudo chown -R gvm:gvm /var/log/gvm
- sudo chown -R gvm:gvm /run/gvmd
- sudo chmod -R g+srw /var/lib/gvm
- sudo chmod -R g+srw /var/lib/openvas
- sudo chmod -R g+srw /var/log/gvm
- sudo chown gvm:gvm /usr/local/sbin/gvmd
- sudo chmod 6750 /usr/local/sbin/gvmd
- # ---------------------------------------------------------------------------
- # 17b. TLS certificate for gsad
- # ---------------------------------------------------------------------------
- # gvm-manage-certs -a creates:
- # /var/lib/gvm/CA/cacert.pem
- # /var/lib/gvm/CA/servercert.pem
- # /var/lib/gvm/private/CA/serverkey.pem
- # Its install path varies by gvmd version; fall back to openssl if absent.
- if [[ ! -f /var/lib/gvm/CA/servercert.pem ]]; then
- sudo mkdir -p /var/lib/gvm/CA /var/lib/gvm/private/CA
- GVM_MANAGE_CERTS=$(find /usr/local -name gvm-manage-certs -type f 2>/dev/null | head -1)
- if [[ -n "$GVM_MANAGE_CERTS" ]]; then
- sudo chown -R gvm:gvm /var/lib/gvm/CA /var/lib/gvm/private
- sudo -u gvm "$GVM_MANAGE_CERTS" -a
- else
- sudo openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
- -keyout /var/lib/gvm/private/CA/serverkey.pem \
- -out /var/lib/gvm/CA/servercert.pem \
- -subj "/CN=Greenbone Security Assistant"
- sudo chown -R gvm:gvm /var/lib/gvm/CA /var/lib/gvm/private
- fi
- fi
- sudo chmod 640 /var/lib/gvm/private/CA/serverkey.pem
- sudo chown gvm:gvm /var/lib/gvm/private/CA/serverkey.pem
- # ---------------------------------------------------------------------------
- # 18. Feed validation GnuPG keyring
- # ---------------------------------------------------------------------------
- export GNUPGHOME=/tmp/openvas-gnupg
- mkdir -p "$GNUPGHOME"
- gpg --import /tmp/GBCommunitySigningKey.asc || true
- echo "8AE4BE429B60A59B311C2E739823FAA60ED1E580:6:" | gpg --import-ownertrust
- export OPENVAS_GNUPG_HOME=/etc/openvas/gnupg
- sudo mkdir -p "$OPENVAS_GNUPG_HOME"
- sudo cp -r /tmp/openvas-gnupg/* "$OPENVAS_GNUPG_HOME/"
- sudo chown -R gvm:gvm "$OPENVAS_GNUPG_HOME"
- unset GNUPGHOME
- # ---------------------------------------------------------------------------
- # 19. sudo configuration for scanning
- # ---------------------------------------------------------------------------
- sudo tee /etc/sudoers.d/gvm >/dev/null <<'EOF'
- # Allow /usr/local path
- Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
- # Allow users of the gvm group to run openvas
- %gvm ALL = NOPASSWD: /usr/local/sbin/openvas
- EOF
- sudo chmod 0440 /etc/sudoers.d/gvm
- sudo visudo -cf /etc/sudoers.d/gvm
- # ---------------------------------------------------------------------------
- # 20. PostgreSQL
- # ---------------------------------------------------------------------------
- sudo dnf install -y postgresql-server postgresql-contrib
- if [[ ! -f /var/lib/pgsql/data/PG_VERSION ]]; then
- sudo postgresql-setup --initdb --unit postgresql
- fi
- sudo systemctl enable --now postgresql
- sudo -u postgres bash -c '
- set -e
- if ! psql -tAc "SELECT 1 FROM pg_roles WHERE rolname='\''gvm'\''" | grep -q 1; then
- createuser -DRS gvm
- fi
- if ! psql -tAc "SELECT 1 FROM pg_database WHERE datname='\''gvmd'\''" | grep -q 1; then
- createdb -O gvm gvmd
- fi
- psql gvmd -c "create role dba with superuser noinherit;" || true
- psql gvmd -c "grant dba to gvm;"
- '
- # ---------------------------------------------------------------------------
- # 21. systemd service units
- # ---------------------------------------------------------------------------
- sudo tee /etc/systemd/system/ospd-openvas.service >/dev/null <<'EOF'
- [Unit]
- Description=OSPd Wrapper for the OpenVAS Scanner (ospd-openvas)
- Documentation=man:ospd-openvas(8) man:openvas(8)
- After=network.target networking.service [email protected] openvasd.service
- [email protected] openvasd.service
- ConditionKernelCommandLine=!recovery
- [Service]
- Type=exec
- User=gvm
- Group=gvm
- RuntimeDirectory=ospd
- RuntimeDirectoryMode=2775
- PIDFile=/run/ospd/ospd-openvas.pid
- ExecStart=/usr/local/bin/ospd-openvas --foreground --unix-socket /run/ospd/ospd-openvas.sock --pid-file /run/ospd/ospd-openvas.pid --log-file /var/log/gvm/ospd-openvas.log --lock-file-dir /var/lib/openvas --socket-mode 0o770 --notus-feed-dir /var/lib/notus/advisories
- SuccessExitStatus=SIGKILL
- Restart=always
- RestartSec=60
- [Install]
- WantedBy=multi-user.target
- EOF
- sudo tee /etc/systemd/system/gvmd.service >/dev/null <<'EOF'
- [Unit]
- Description=Greenbone Vulnerability Manager daemon (gvmd)
- After=network.target networking.service postgresql.service ospd-openvas.service
- Wants=postgresql.service ospd-openvas.service
- Documentation=man:gvmd(8)
- ConditionKernelCommandLine=!recovery
- [Service]
- Type=exec
- User=gvm
- Group=gvm
- PIDFile=/run/gvmd/gvmd.pid
- RuntimeDirectory=gvmd
- RuntimeDirectoryMode=2775
- ExecStart=/usr/local/sbin/gvmd --foreground --osp-vt-update=/run/ospd/ospd-openvas.sock --listen-group=gvm
- Restart=always
- TimeoutStopSec=10
- [Install]
- WantedBy=multi-user.target
- EOF
- sudo tee /etc/systemd/system/gsad.service >/dev/null <<'EOF'
- [Unit]
- Description=Greenbone Security Assistant daemon (gsad)
- Documentation=man:gsad(8) https://www.greenbone.net
- After=network.target gvmd.service
- Wants=gvmd.service
- [Service]
- Type=exec
- User=gvm
- Group=gvm
- RuntimeDirectory=gsad
- RuntimeDirectoryMode=2775
- PIDFile=/run/gsad/gsad.pid
- ExecStart=/usr/local/sbin/gsad --foreground --listen=0.0.0.0 --port=9392 --ssl-certificate=/var/lib/gvm/CA/servercert.pem --ssl-private-key=/var/lib/gvm/private/CA/serverkey.pem
- Restart=always
- TimeoutStopSec=10
- [Install]
- WantedBy=multi-user.target
- Alias=greenbone-security-assistant.service
- EOF
- sudo tee /etc/systemd/system/openvasd.service >/dev/null <<'EOF'
- [Unit]
- Description=OpenVASD
- Documentation=https://github.com/greenbone/openvas-scanner/tree/main/rust/openvasd
- ConditionKernelCommandLine=!recovery
- [Service]
- Type=exec
- User=gvm
- RuntimeDirectory=openvasd
- RuntimeDirectoryMode=2775
- ExecStart=/usr/local/bin/openvasd --mode service_notus --products /var/lib/notus/products --advisories /var/lib/notus/advisories --listening 127.0.0.1:3000
- SuccessExitStatus=SIGKILL
- Restart=always
- RestartSec=60
- [Install]
- WantedBy=multi-user.target
- EOF
- sudo systemctl daemon-reload
- # ---------------------------------------------------------------------------
- # 22. Initial feed synchronization (this can take a long time)
- # ---------------------------------------------------------------------------
- echo
- echo "==> Starting initial Greenbone feed sync. This may take a long time..."
- sudo /usr/local/bin/greenbone-feed-sync
- # ---------------------------------------------------------------------------
- # 23. Enable + start services
- # ---------------------------------------------------------------------------
- sudo systemctl enable --now ospd-openvas
- sudo systemctl enable --now gvmd
- sudo systemctl enable --now gsad
- sudo systemctl enable --now openvasd
- # ---------------------------------------------------------------------------
- # 24. Create admin user and set feed-import-owner
- # ---------------------------------------------------------------------------
- if ! sudo -u gvm /usr/local/sbin/gvmd --get-users | grep -q '^admin$'; then
- echo "==> Creating admin user (password will be printed once below):"
- sudo -u gvm /usr/local/sbin/gvmd --create-user=admin
- fi
- ADMIN_UUID=$(sudo -u gvm /usr/local/sbin/gvmd --get-users --verbose | awk '$1=="admin"{print $2; exit}')
- if [[ -n "$ADMIN_UUID" ]]; then
- sudo -u gvm /usr/local/sbin/gvmd \
- --modify-setting 78eceaec-3385-11ea-b237-28d24461215b \
- --value "$ADMIN_UUID"
- fi
- # ---------------------------------------------------------------------------
- # Install comment.sty LaTeX package
- # ---------------------------------------------------------------------------
- sudo mkdir -p /usr/share/texlive/texmf-local/tex/latex/comment
- sudo curl -L \
- https://mirrors.ctan.org/macros/latex/contrib/comment/comment.sty \
- -o /usr/share/texlive/texmf-local/tex/latex/comment/comment.sty
- sudo mktexlsr
- # ---------------------------------------------------------------------------
- # Done
- # ---------------------------------------------------------------------------
- cat <<EOF
- ============================================================================
- Greenbone Community Edition installation complete.
- - Web UI: https://127.0.0.1:9392
- - Admin user: admin (password shown above, if newly created)
- - Service status: sudo systemctl status ospd-openvas gvmd gsad openvasd
- - Logs: /var/log/gvm/
- NOTE: The first start of the services may take minutes to hours while the
- feed data is loaded into memory and the database. Scans started before
- loading completes will produce incomplete results.
- Tail the loading progress with:
- sudo tail -f /var/log/gvm/gvmd.log /var/log/gvm/ospd-openvas.log
- Re-login (or run \`newgrp gvm\`) so your shell picks up the new gvm group
- membership.
- ============================================================================
- EOF
Advertisement