-
Notifications
You must be signed in to change notification settings - Fork 14
Installing hashdb
hashdb v3.0-Alpha is now available for Windows, Linux, and Mac platforms. hashdb v3.0 provides the hashdb program as well as the hashdb Python module and C++ library components.
- Uninstall any previous version of hashdb.
- Download and install the hashdb and bulk_extractor Windows installers from here. A compatible version of SectorScope is also available at this link.
hashdb is expected to be compatible with several Linux flavors. Steps are shown to configure, build, and install hashdb.
Once configured, you may wish to run make check
to check that various components are installed and pass tests. There are three test sets: 1) basic tests, 2) Python tests, and 3) Python interface tests. Python tests will not run if Python is not installed. Python interface tests will not run if Python-devel and SWIG are not installed or when cross-compiling to Windows.
Set up the build environment:
sudo dnf update
sudo dnf groupinstall development-tools
sudo dnf install gcc-c++
sudo dnf install openssl-devel
sudo dnf install libewf-devel
sudo dnf install bzip2-devel
sudo dnf install zlib-devel
sudo dnf install swig
sudo dnf install python-devel
sudo dnf install libtool
The swig
and python-devel
packages are only required if you want to build the hashdb Python extension module. libtool
is only required for developers who build from GitHub source.
sudo apt-get install autoconf build-essential libssl-dev libtool-bin python-dev swig libewf-dev libbz2-dev zlib1g-dev
sudo yum update
sudo yum groupinstall development-tools
sudo yum install openssl-devel
sudo yum install libewf-devel
sudo yum install bzip2-devel
sudo yum install zlib-devel
sudo yum install gcc-c++
sudo yum update
sudo yum gropuinstall development tools
sudo yum install openssl-devel
sudo yum install libewf-devel
sudo yum install bzip2-devel
sudo yum install zlib-devel
Install Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install dependencies:
brew install libtool
brew install autoconf
brew install automake
brew install gcc
brew install libewf
brew install bzip2
brew install openssl
When running make
, the build environment may not be able to find the compiler or packages.
To select GCC:
./configure CC=g++-6 CXX=gcc-6
If openssl/evp.h
cannot be found and for example openssl is at /usr/bin/openssl
but you need /usr/local/include/openssl
, try helping Brew as follows, verifying the path before and after:
which openssl
brew link openssl --force
which openssl
sudo port install autoconf automake pkgconfig
Please download and unzip the latest .tar.gz hashdb distribution tarball available here. For example type:
wget http://digitalcorpora.org/downloads/hashdb/hashdb-x.x.x.tar.gz
tar -xvf hashdb-x.x.x.tar.gz
Alternatively, developers may wish to build the latest source from GitHub. Clone hashdb and run bootstrap.sh
:
git clone https://github.com/NPS-DEEP/hashdb.git
cd hashdb
./bootstrap.sh
./configure
./make
./sudo make install
./configure --prefix=$HOME/local/ --exec-prefix=$HOME/local CPPFLAGS=-I$HOME/local/include/ LDFLAGS=-L$HOME/local/lib
make
make install
The system PATH
and PYTHONPATH
system variables may need to be set to allow hashdb resources to be visible at the command prompt. Please see output from make install
to find your paths if they are different. If you like, you might put these settings in your ~/.bashrc
file.
- The hashdb tool should automatically be accessible.
- The hashdb.py interface can be made available by typing
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:/usr/local/lib64/python2.7/site-packages
, which provides access the installedpython.py
and_python.so
resources, respectively.
- The hashdb tool can be made available by typing
export PATH=$HOME/local/bin:$PATH
. - The hashdb.py interface can be made available by typing
export PYTHONPATH=~/local/lib/python2.7/site-packages:~/local/lib64/python2.7/site-packages
, which provides access the installedpython.py
and_python.so
resources, respectively.
NOTE: This section describes how to build the Windows configuration of hashdb. Users should download a pre-built Windows installer instead of doing this.
Run this setup script to set up a Fedora 23 system to cross-compile hashdb:
cd src_win
./CONFIGURE_F23.bash
To build multiple configurations, use VPATH builds. Build the Windows configuration under win32/
:
mkdir win32
cd win32
mingw64-configure
make
make
will create the Windows installer under win32/src_win/
.
To keep configurations straight, you may wish to build your native Linux/Mac configuration under build/
:
mkdir build
cd build
../configure
-
Build and install hashdb.
-
Install additional packages:
flex libxml2-devel tre-devel afflib-devel sqlite-devel
. -
Obtain and bootstrap the latest bulk_extractor from GitHub:
git clone --recursive https://github.com/simsong/bulk_extractor.git cd bulk_extractor sh bootstrap.sh
-
Then run
configure
,make
,make install
as shown for hashdb.
For further detail, please see https://github.com/simsong/bulk_extractor/wiki/Installing-bulk_extractor.