Created
April 10, 2011 10:04
-
-
Save yunazuno/912208 to your computer and use it in GitHub Desktop.
Install dionaea on Ubuntu 10.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Install dionaea on Ubuntu 10.04 | |
# | |
# Based on: http://dionaea.carnivore.it/#compiling | |
# | |
# keep privileged state(bad hack...) | |
LOCKFILE=$$.pid | |
touch $LOCKFILE | |
sudo echo -n | |
while [ -e $LOCKFILE ]; do sudo echo -n; sleep 60; done & | |
# Install managed packages | |
sudo aptitude -y install libudns-dev libglib2.0-dev libssl-dev libcurl4-openssl-dev curl \ | |
libreadline-dev libsqlite3-dev python-dev \ | |
libtool automake autoconf build-essential \ | |
subversion git-core \ | |
flex bison \ | |
pkg-config \ | |
gettext | |
sudo mkdir /opt/dionaea | |
# | |
# liblcfg | |
# | |
git clone git://git.carnivore.it/liblcfg.git liblcfg | |
pushd liblcfg/code | |
autoreconf -vi | |
./configure --prefix=/opt/dionaea | |
sudo make install | |
popd | |
# | |
# libemu | |
# | |
git clone git://git.carnivore.it/libemu.git libemu | |
pushd libemu | |
autoreconf -vi | |
./configure --prefix=/opt/dionaea | |
sudo make install | |
popd | |
# | |
# libnl | |
# | |
# On my system, libnl is not compatible with dionaea. | |
#git clone git://git.kernel.org/pub/scm/libs/netlink/libnl.git | |
#pushd libnl | |
#autoreconf -vi | |
#export LDFLAGS=-Wl,-rpath,/opt/dionaea/lib | |
#./configure --prefix=/opt/dionaea | |
#make | |
#sudo make install | |
#popd | |
# | |
# libev | |
# | |
wget http://dist.schmorp.de/libev/Attic/libev-3.9.tar.gz | |
tar xfz libev-3.9.tar.gz | |
pushd libev-3.9 | |
./configure --prefix=/opt/dionaea | |
sudo make install | |
popd | |
# | |
# Cython | |
# | |
wget http://cython.org/release/Cython-0.12.1.tar.gz | |
tar xfz Cython-0.12.1.tar.gz | |
pushd Cython-0.12.1 | |
python setup.py build | |
sudo python setup.py install | |
popd | |
# | |
# Python 3.1.2 | |
# | |
wget http://python.org/ftp/python/3.1.2/Python-3.1.2.tgz | |
tar xfz Python-3.1.2.tgz | |
pushd Python-3.1.2/ | |
./configure --enable-shared --prefix=/opt/dionaea --with-computed-gotos --enable-ipv6 LDFLAGS="-Wl,-rpath=/opt/dionaea/lib/" | |
make | |
sudo make install | |
popd | |
# | |
# lxml | |
# | |
sudo aptitude -y install libxml2-dev libxslt1-dev | |
wget http://codespeak.net/lxml/lxml-2.2.6.tgz | |
tar xfz lxml-2.2.6.tgz | |
pushd lxml-2.2.6 | |
# fix some py3 issues with lxml | |
/opt/dionaea/bin/2to3 -w src/lxml/html/_diffcommand.py | |
/opt/dionaea/bin/2to3 -w src/lxml/html/_html5builder.py | |
# continue the install ... | |
/opt/dionaea/bin/python3 setup.py build | |
sudo /opt/dionaea/bin/python3 setup.py install | |
popd | |
# | |
# libpcap | |
# | |
wget http://www.tcpdump.org/release/libpcap-1.1.1.tar.gz | |
tar xfz libpcap-1.1.1.tar.gz | |
pushd libpcap-1.1.1 | |
./configure --prefix=/opt/dionaea | |
make | |
sudo make install | |
popd | |
# | |
# dionaea | |
# | |
git clone git://git.carnivore.it/dionaea.git dionaea | |
pushd dionaea | |
autoreconf -vi | |
./configure --with-lcfg-include=/opt/dionaea/include/ \ | |
--with-lcfg-lib=/opt/dionaea/lib/ \ | |
--with-python=/opt/dionaea/bin/python3.1 \ | |
--with-cython-dir=/usr/local/bin \ | |
--with-udns-include=/opt/include/ \ | |
--with-udns-lib=/usr/lib/ \ | |
--with-emu-include=/opt/dionaea/include/ \ | |
--with-emu-lib=/opt/dionaea/lib/ \ | |
--with-gc-include=/usr/include/gc \ | |
--with-ev-include=/opt/dionaea/include \ | |
--with-ev-lib=/opt/dionaea/lib \ | |
--with-curl-config=/usr/bin/ \ | |
--with-pcap-include=/opt/dionaea/include \ | |
--with-pcap-lib=/opt/dionaea/lib/ | |
make | |
sudo make install | |
popd | |
# remove lockfile | |
rm $LOCKFILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment