Installing the Latest ZMap Release

The latest stable release of ZMap is version 2.1.0 and supports Linux, Mac OS, and BSD. It can be installed through the built-in package managers on the following operating systems:

Debian or Ubuntu: sudo apt-get install zmap

Fedora, CentOS, and RHEL: sudo yum install zmap

Gentoo: sudo emerge zmap

Mac OS (brew): brew install zmap

Arch Linux: Available through AUR

ZMap is hosted on GitHub at https://github.com/zmap/zmap. Issues should be reported on the Github Issue Tracker or sent to our team at zmap-team@umich.edu.

Building ZMap from Source

The latest bleeding-edge version of ZMap can cloned from the git repository at git://github.com/zmap/zmap.git. The latest stable release can also be downloaded at v2.1.0.tar.gz.

ZMap can be built from source with most recent versions of gcc and the CMake build system. If you are building from source, you will also need the following libraries: GMP, libpcap, Gengetopt, byacc, and flex. These can be installed as follows:

Debian or Ubuntu: sudo apt-get install build-essential cmake libgmp3-dev libpcap-dev gengetopt byacc flex

Red Hat Enterprise Linux or CentOS: sudo yum install cmake gmp gmp-devel libpcap-devel gengetopt byacc flex

Mac OS: brew install cmake gmp gengetopt json-c byacc libdnet or sudo port install gmp libdnet byacc flex gengetopt cmake

Once these requirements have been installed, ZMap can be installed by running cmake -DENABLE_DEVELOPMENT=OFF followed by make and sudo make install.

Redis support is not enabled by default. If you want to use ZMap with Redis, you will first need to install Hiredis. Then, rebuild ZMap with the command cmake -DWITH_REDIS=ON. If you don't want to run ZMap as root, you can give the binary permission to use the raw network with setcap cap_net_raw=ep /usr/local/sbin/zmap.

Similarly, JSON support is not enabled by default. If you want to output to JSON, install JSON-C. Then rebuild ZMap with cmake -DWITH_JSON=ON. Installing json-c from source requires git and autotools to be available. For more information on how to install JSON-C, see http://github.com/json-c/json-c.

Installing json-c from source requires git and autotools to be available. For more information on how to install json-c, please see http://github.com/json-c/json-c. If you are running on Ubuntu, these dependencies can be installed by running: sudo apt-get install git pkg-config libjson0-dev.