Skip to content
This repository was archived by the owner on Nov 20, 2021. It is now read-only.

Files

216 lines (152 loc) · 7.24 KB

install.rst

File metadata and controls

216 lines (152 loc) · 7.24 KB

Installing Bro

Before installing Bro, you'll need to ensure that some dependencies are in place.

Bro requires the following libraries and tools to be installed before you begin:

To build Bro from source, the following additional dependencies are required:

To install CAF, first download the source code of the required version from: https://github.com/actor-framework/actor-framework/releases

To install the required dependencies, you can use:

  • RPM/RedHat-based Linux:

    .. console::
    
       sudo yum install cmake make gcc gcc-c++ flex bison libpcap-devel openssl-devel python-devel swig zlib-devel
    
    
  • DEB/Debian-based Linux:

    .. console::
    
       sudo apt-get install cmake make gcc g++ flex bison libpcap-dev libssl-dev python-dev swig zlib1g-dev
    
    
  • FreeBSD:

    Most required dependencies should come with a minimal FreeBSD install except for the following.

    .. console::
    
        sudo pkg install bash cmake swig bison python py27-sqlite3
    
    

    Note that in older versions of FreeBSD, you might have to use the "pkg_add -r" command instead of "pkg install".

  • Mac OS X:

    Compiling source code on Macs requires first installing Xcode (in older versions of Xcode, you would then need to go through its "Preferences..." -> "Downloads" menus to install the "Command Line Tools" component).

    OS X comes with all required dependencies except for CMake, SWIG, OpenSSL, and CAF. (OpenSSL used to be part of OS X versions 10.10 and older, for which it does not need to be installed manually. It was removed in OS X 10.11). Distributions of these dependencies can likely be obtained from your preferred Mac OS X package management system (e.g. Homebrew, MacPorts, or Fink). Specifically for Homebrew, the cmake, swig, openssl and caf packages provide the required dependencies.

Bro can make use of some optional libraries and tools if they are found at build time:

LibGeoIP is probably the most interesting and can be installed on most platforms by following the instructions for :ref:`installing libGeoIP and the GeoIP database <geolocation>`.

Bro can be downloaded in either pre-built binary package or source code forms.

See the bro downloads page for currently supported/targeted platforms for binary releases and for installation instructions.

  • Linux Packages

    Linux based binary installations are usually performed by adding information about the Bro packages to the respective system packaging tool. Then the usual system utilities such as apt, dnf, yum, or zypper are used to perform the installation.

The primary install prefix for binary packages is /opt/bro.

Bro releases are bundled into source packages for convenience and are available on the bro downloads page.

Alternatively, the latest Bro development version can be obtained through git repositories hosted at git.bro.org. See our git development documentation for comprehensive information on Bro's use of git revision control, but the short story for downloading the full source code experience for Bro via git is:

.. console::

    git clone --recursive git://git.bro.org/bro

Note

If you choose to clone the bro repository non-recursively for a "minimal Bro experience", be aware that compiling it depends on several of the other submodules as well.

The typical way to build and install from source is (for more options, run ./configure --help):

.. console::

    ./configure
    make
    make install

If the configure script fails, then it is most likely because it either couldn't find a required dependency or it couldn't find a sufficiently new version of a dependency. Assuming that you already installed all required dependencies, then you may need to use one of the --with-* options that can be given to the configure script to help it locate a dependency.

The default installation path is /usr/local/bro, which would typically require root privileges when doing the make install. A different installation path can be chosen by specifying the configure script --prefix option. Note that /usr and /opt/bro are the standard prefixes for binary Bro packages to be installed, so those are typically not good choices unless you are creating such a package.

OpenBSD users, please see our FAQ if you are having problems installing Bro.

Depending on the Bro package you downloaded, there may be auxiliary tools and libraries available in the aux/ directory. Some of them will be automatically built and installed along with Bro. There are --disable-* options that can be given to the configure script to turn off unwanted auxiliary projects that would otherwise be installed automatically. Finally, use make install-aux to install some of the other programs that are in the aux/bro-aux directory.

Finally, if you want to build the Bro documentation (not required, because all of the documentation for the latest Bro release is available on the Bro web site), there are instructions in doc/README in the source distribution.

You may want to adjust your PATH environment variable according to the platform/shell/package you're using. For example:

Bourne-Shell Syntax:

.. console::

   export PATH=/usr/local/bro/bin:$PATH

C-Shell Syntax:

.. console::

   setenv PATH /usr/local/bro/bin:$PATH

Or substitute /opt/bro/bin instead if you installed from a binary package.