openvas在centos平台源码编译安装

[root@localhost home]# /etc/init.d/iptables status
[root@localhost home]# /etc/init.d/iptables stop
[root@localhost home]# chkconfig --level 35 iptables off //永久关闭

[root@localhost Desktop]# vi /etc/selinux/config
INUX=disabled

[root@localhost home]# yum install cmake
[root@localhost home]# yum instll gcc
[root@localhost home]# yum install nmap

——————/安装openvas-library
[root@localhost home]# tar xzf openvas-libraries-7.0.2.tar.gz
[root@localhost home]# cd openvas-libraries-7.0.2
[root@localhost openvas-libraries-7.0.2]# mkdir build
[root@localhost openvas-libraries-7.0.2]# cd build/
[root@localhost build]# cmake ..
[root@localhost build]# yum install libpcap-devel gpgme-devel libuuid-devel glib2-devel gnutls-devel

[root@localhost build]# make
/home/openvas-libraries-7.0.2/misc/openvas_server.c: In function ‘openvas_server_open_with_cert’:
/home/openvas-libraries-7.0.2/misc/openvas_server.c:291: error:
implicit declaration of function ‘gnutls_certificate_set_retrieve_function’
make[2]: *** [misc/CMakeFiles/openvas_misc_shared.dir/openvas_server.c.o] Error 1
make[1]: *** [misc/CMakeFiles/openvas_misc_shared.dir/all] Error 2
make: *** [all] Error 2
注释掉所有报错代码
[root@localhost build]# make install

——————/安装openvas-scanner
-- package 'libopenvas>=6.0.2' not found
[root@localhost build]# export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig/
[root@localhost build]# make
[root@localhost build]# make install

——————/安装openvas-manager
package 'sqlite3' not found
[root@localhost lyl]# wget http://www.sqlite.org/sqlite-autoconf-3070500.tar.gz
[root@localhost lyl]# tar xzf sqlite-autoconf-3070500.tar.gz
[root@localhost lyl]# cd sqlite-autoconf-3070500
[root@localhost lyl]# ./configure
[root@localhost lyl]# make
[root@localhost lyl]# make install

[root@localhost build]# make
问题:
omp.c:9714: error: implicit declaration of function ‘g_utf8_substring’
将g_utf8_substring(text, 0, 60)替换为g_strndup(text, 60);
[root@localhost build]# make install

——————/安装greenbone-security-assistant
[root@localhost build]# yum install libxml2-devel libxslt-devel

No package 'libmicrohttpd' found
[root@localhost lyl]# tar libmicrohttpd-0.9.37.tar.gz
[root@localhost lyl]# cd libmicrohttpd-0.9.37
[root@localhost libmicrohttpd-0.9.37]# ./configure
[root@localhost libmicrohttpd-0.9.37]# make
[root@localhost libmicrohttpd-0.9.37]# make install

[root@localhost build]# make
cc1: warnings being treated as errors
error: implicit declaration of function ‘pthread_mutex_init’
……
[root@localhost build]# vi ../CMakeLists.txt
## set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror")
[root@localhost build]# make install

[root@localhost home]# gsad
GLib-ERROR **: The thread system is not yet initialized.
aborting...
Aborted (core dumped)
[root@localhost build]# vi ../src/gsad.c
if (!g_thread_supported ()) g_thread_init (NULL); //添加该行
if (mutex == NULL)
mutex = g_mutex_new ();

——————/调试
[root@localhost home]# vi openvas-check-setup
[root@localhost home]# chmod +x openvas-check-setup
[root@localhost home]# ./openvas-check-setup
问题1:
ERROR: No OpenVAS Scanner (openvassd) found.
参考:http://blog.chinaunix.net/uid-26212859-id-3256667.html
[root@localhost home]# vi /etc/ld.so.conf
/usr/local/lib
[root@localhost home]# ldconfig
问题2:
ERROR: No client certificate file of OpenVAS Manager found.
[root@localhost home]# openvas-mkcert-client
[root@localhost home]# cp /tmp/openvas-mkcert-client.2654/key_om.pem
/usr/local/var/lib/openvas/private/CA/clientkey.pem
[root@localhost home]# cp /tmp/openvas-mkcert-client.2654/cert_om.pem
/usr/local/var/lib/openvas/CA/clientcert.pem
保证:
[root@localhost home]# netstat –apt
tcp 0 0 *:otp *:* LISTEN 2585/openvasmd
tcp 0 0 *:9391 *:* LISTEN 2580/openvassd: Rel
tcp 0 0 *:https *:* LISTEN 2588/gsad

[root@localhost home]# openvasmd --create-user=lyl
User created with password 'caad6f2f-88bb-4805-af64-1c471ee9952d'.

https://192.168.206.140/:443
caad6f2f-88bb-4805-af64-1c471ee9952d
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值