-
Notifications
You must be signed in to change notification settings - Fork 640
Build Guide
This document is a step-by-step guide to build TheHive from sources.
The following softwares are required to download and build TheHive.
- Java Development Kit 8 (JDK)
- downloadable from http://www.oracle.com/technetwork/java/javase/downloads/index.html
- git
- Use the system package or downloadable it from http://www.git-scm.com/downloads
- ElasticSearch 2.3
- downloadable from https://www.elastic.co/downloads/past-releases/elasticsearch-2-3-5
- NodeJs with its package manager (NPM)
- downloadable from https://nodejs.org/en/download/
- Grunt
- After NodeJs installation, run
npm install -g grunt-cli
- After NodeJs installation, run
- Bower
- After NodeJs installation, run
npm install -g bower
- After NodeJs installation, run
Here is the way to install requirements and build the application from sources.
apt-get install git wget
echo 'deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main' > /etc/apt/sources.list.d/java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key EEA14886
apt-get update
apt-get install oracle-java8-installer
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key D88E42B4
echo "deb https://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
sudo apt-get update && sudo apt-get install elasticsearch
apt-get install wget
wget -qO- https://deb.nodesource.com/setup_4.x | bash -
apt-get install nodejs
npm install -g bower grunt-cli
cd /opt
git clone https://github.com/CERT-BDF/TheHive.git
cd TheHive/bin
./activator clean stage
It will download all dependencies (could be long) then build the back-end.
This command clean previous build files and create an autonomous package in target/universal/stage
directory. This packages contains TheHive binaries with required libraries (/lib), analyzers (/analyzers), configuration files (/conf), startup scripts (/bin).
echo -e "script.inline=on\ncluster.name=hive\nthreadpool.index.queue_size=100000\nthreadpool.search.queue_size=100000\nthreadpool.bulk.queue_size=1000 >> /etc/elasticsearch/elasticsearch.yml
service elasticsearch restart
cd TheHive/target/universal/stage/
cat >> conf/application.conf << _EOF_
# Secret key
# ~~~~~
# The secret key is used to secure cryptographics functions.
# If you deploy your application to several instances be sure to use the same key!
play.crypto.secret="$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 64 | head -n 1)"
_EOF_
bin/thehive
- Open your browser and connect to http://ADRESSE_OF_YOUR_SERVER:9000.
- Follow 4.3. First start in the Installation guide to start using TheHive.
-- END OF FILE --
Run the following command :
git clone https://github.com/CERT-BDF/TheHive.git
Go to the project directory ...
cd TheHive
... and run the following command.
activator clean stage
On *nix systems, this command must be prepend with ./
.
It will download all dependencies (could be long) then build the back-end.
This command clean previous build files and create an autonomous package in target/universal/stage
directory. This packages contains TheHive binaries with required libraries (/lib), analyzers (/analyzers), configuration files (/conf), startup scripts (/bin).
Go to front-end directory ...
cd TheHive/ui
Install NodeJs libraries (required by building step), bower libraries (javascript libraries downloaded by browser). Then build the front-end :
npm install
bower install
grunt build
This step generates static files (html, javascript and related resources) in dist
directory. These files are ready to be imported in http server.