一、Kali

1、sudo apt-get install build-essential cmake libgmp3-dev libpcap-dev gengetopt byacc flex

2、git clone git://github.com/zmap/zmap.git

3、cd zmap/

4、cmake -DENABLE_HARDENING=ON

5、make

6、make install

可能出错:

1.fatal error: unistr.h: No such file or directory,则需要安装 libunistring-dev库:
sudo apt-get install libunistring-dev

2.未安装cmake:

获取cmake 2.8.12源码包
cd /root/Downloads/
wget http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz
tar -xvzf cmake-2.8.12.1.tar.gz
 编译并安装cmake
cd cmake-2.8.12.1
./bootstrap
make
make install
cmake –version

3.未安装json-c:

获取json-c
$ git clone git://github.com/json-c/json-c.git
$ cd json-c
$ sh autogen.sh

$ ./configure
$ make
$ make install
$ make check
$ ldconfig 

4.安装json-c可能需要安装libtool:

sudo apt-get install autoconf automake libtool


编译并安装json-c
$ ./configure
$ make
$ make install
$ make check
$ ldconfig  

5.缺少gengetopt命令:

在gengetopt官方网站上进入ftp站点,下载最新版,root权限下执行./configure & make & make install即可


二、CentOS 

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum  -y  install  zmap

 

参考:

http://www.dzwanli.com.cn/?p=1253

http://vipscu.blog.163.com/blog/static/181808372201532714332980/

http://r4bb17.com/2015/11/zmap/