CentOS 7 搭建OpenVAS

搭建环境

[root@VM170-openvase ~]# cat /etc/redhat-release

CentOS Linux release 7.6.1810 (Core)

OpenVAS 9

 

环境准备

在正式安装前确定关闭防火墙、清除防火墙规则以及selinux

 

【关闭selinux】

[root@VM170-openvase ~]# sudo sed -i.ori 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config # 永久关闭selinux

[root@VM170-openvase ~]# setenforce 0  # 临时关闭selinux

【清空防火墙规则】

[root@VM170-openvase ~]# iptables -F && iptables -t nat -F # 清空防火墙规则

【关闭firewalld】

[root@VM170-openvase ~]# systemctl stop firewalld && systemctl disabled firewalld  # 关闭防火墙且去除开机自启

 

1、先安装依赖

[root@VM170-openvase network-scripts]# yum install -y wget bzip2 texlive net-tools alien gnutls-utils

2、配置源

[root@VM170-openvase ~]# wget -q -O - https://www.atomicorp.com/installers/atomic | sh

3、安装openvas9

[root@VM170-openvase ~]# yum install openvas -y

 

 

4、配置redis.conf开放sock和700权限

[root@VM170-openvase ~]# sudo sed -i.ori 's$# unixsocket /tmp/redis.sock$unixsocket /tmp/redis.sock$' /etc/redis.conf

[root@VM170-openvase ~]# sudo sed -i.ori 's$# unixsocketperm 700$unixsocketperm 700$' /etc/redis.conf

即去掉/etc/redis.conf文件中下面两行的注释即可

unixsocket /tmp/redis.sock

unixsocketperm 700

5、重启redis并配置开机自启

[root@VM170-openvase ~]# systemctl enable redis && systemctl restart redis

6、开始安装openvas(此处需要花费一段时间,0.5-1h)

[root@VM170-openvase ~]# openvas-setup

完成后会让输入administrator密码

这里我设置为123456

7、接下来就是web端的操作了

直接内网输入服务器ip即可进入,登陆账号admin,密码123456

至此搭建已经完成,接下来就是如何使用,请移步这里openvas 9 详解

centos 7 搭建openvas_sed