简介:本文档提供详细的步骤和指导,帮助用户在不同操作系统上成功编译并安装OpenVAS扫描器的最新版本9.x。
在Ubuntu 16.04系统上编译安装OpenVAS9的详细步骤如下:
### 编译过程
首先,请确保从官方源码库下载所需的包文件。
#### 环境准备:
- 更新软件包列表并安装必要的开发工具及依赖项。
```shell
sudo apt-get update
sudo apt-get install -y build-essential wget git libcurl4-gnutls-dev libgnutls28-dev uuid-dev sqlite3 libsqlite3-dev bison flex python-software-properties debhelper dh-make autoconf automake autotools-dev autopoint curl g++ gcc cmake checkinstall pkg-config quilt
```
#### 下载源码:
从OpenVAS的官方仓库获取最新的稳定版本(建议使用git clone命令)。
```shell
cd /opt/
sudo git clone https://github.com/greenbone/openvas-scanner.git openvas-scan
sudo git clone https://github.com/greenbone/ospd.git ospd
```
#### 编译安装:
按照官方文档中的说明进行编译和配置,确保所有依赖项都已正确设置。
```shell
cd /opt/openvas-scan/
./configure --prefix=/usr/local --sysconfdir=/etc --localstatedir=/var/lib/ospd
make && sudo make install
cd /opt/ospd/
python3 setup.py build_ext -i
sudo python3 setup.py install
```
### 后续配置与数据同步:
- 完成安装后,需要进行一些基本的系统和安全设置。
```shell
sudo systemctl enable openvas-scanner.service
sudo systemctl start openvas-scanner.service
# 配置OpenVAS Manager (OMP) 和其他服务端组件,并根据需求调整其运行参数。
# 同步最新的漏洞数据库:
openvasmd --rebuild
```
确保在安装和配置过程中遵循官方文档的指导,以保证系统的稳定性和安全性。