#!/bin/sh yum -y install gcc cmake bison pkgconfig libuuid-devel hiredis-devel openldap-devel libgcrypt-devel libksba-devel gnutls-devel glib2-devel openssl-devel gpgme-devel zlib-devel net-snmp-devel libssh-devel sqlite-devel sqlite libmicrohttpd-devel libxml-devel libexslt-devel libmicrohttpd-devel libxml-devel libexslt-devel libxslt-devel redis gnutls-utils export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig echo "/usr/local/lib" >> /etc/ld.so.conf.d/openvas.conf ldconfig mkdir -p /opt/openvas cd /opt/openvas wget http://wald.intevation.org/frs/download.php/2420/openvas-libraries-9.0.1.tar.gz tar zxf openvas-libraries-9.0.1.tar.gz && cd openvas-libraries-9.0.1 mkdir build && cd build cmake .. make && make install cd /opt/openvas wget http://wald.intevation.org/frs/download.php/2423/openvas-scanner-5.1.1.tar.gz tar zxf openvas-scanner-5.1.1.tar.gz && cd openvas-scanner-5.1.1 mkdir build && cd build cmake .. make && make install cd /opt/openvas wget http://wald.intevation.org/frs/download.php/2448/openvas-manager-7.0.2.tar.gz tar zxf openvas-manager-7.0.2.tar.gz && cd openvas-manager-7.0.2 mkdir build && cd build cmake .. make && make install cd /opt/openvas wget http://wald.intevation.org/frs/download.php/2429/greenbone-security-assistant-7.0.2.tar.gz tar zxf greenbone-security-assistant-7.0.2.tar.gz && cd greenbone-security-assistant-7.0.2 mkdir build && cd build cmake .. make && make install #同步漏洞庫 greenbone-nvt-sync #同步其餘數據 greenbone-scapdata-sync #建立用戶 openvasmd --create-user=admin --role=Admin User created with password 'd4818697-8999-4355-ba08-f039eb582d2b' #修改密碼 openvasmd --user=admin --new-password=12345 #安裝證書 openvas-manage-certs -a #啓動 openvasmd #gsad gsad --http-only --listen="0.0.0.0" #關閉防火牆 systemctl stop firewalld systemctl disable firewalld
yum 安裝的redis須要修改配置php
vim /etc/redis.confredis
unixsocket /tmp/redis.sock
unixsocketperm 700sql
從新啓動redis
vim
錯誤解決:bash
/usr/bin/ld: libmanage.a(lsc_crypt.c.o): undefined reference to symbol 'gpg_strerror'
/usr/lib64/libgpg-error.so.0: error adding symbols: DSO missing from command linessh
cd /opt/openvas/openvas-manager-7.0.2/buildsocket
vim src/CMakeFiles/openvasmd-sqlite.dir/link.txtui
添加:-lgpg-errorunix
修改完成後從新make && make installcode