CentOS6.7搭建蜜罐dionaea

 yum -y install epel-release wget tar git autoconf* libtool-*

mkdir /opt/dionaea

1.安装liblcfg软件。
git clone https://github.com/ThomasAdam/liblcfg.git liblcfg
cd liblcfg/code/
autoreconf -vi
echo $?
*注释:此处如果报错无法copy ltmain.sh。执行cp /usr/share/libtool/config/ltmain.sh ./然后再autoreconf -vi则OK。
./configure --prefix=/opt/dionaea
echo $?
make install
echo $?

2.安装libemu软件。
cd /root
git clone https://github.com/buffer/libemu.git libemu
cd libemu/
autoreconf -vi
echo $?
*注释:此处如果报错无法copy ltmain.sh。执行cp /usr/share/libtool/config/ltmain.sh ./然后再autoreconf -vi则OK。
./configure --prefix=/opt/dionaea
echo $?
make install
echo $?

3.安装libev软件。
cd /root
wget http://dist.schmorp.de/libev/Attic/libev-4.04.tar.gz
tar xf libev-4.04.tar.gz
cd libev-4.04
./configure --prefix=/opt/dionaea
echo $?
make install
echo $?


4.安装Python软件。
cd /root
yum -y groupinstall "Development tools"
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel
wget http://www.python.org/ftp/python/3.2.2/Python-3.2.2.tgz
tar xf Python-3.2.2.tgz
cd Python-3.2.2
./configure --enable-shared --prefix=/opt/dionaea --with-computed-gotos --enable-ipv6 LDFLAGS="-Wl,-rpath=/opt/dionaea/lib/ -L/usr/lib/x86_64-linux-gnu/"
echo $?
make
echo $?
make install
echo $?

5.安装Cython软件。
cd /root
wget http://cython.org/release/Cython-0.15.tar.gz
tar xfz Cython-0.15.tar.gz
wget http://pkgs.fedoraproject.org/repo/pkgs/Cython/Cython-0.15.tar.gz/md5/794b93c4c1c4cc031f90302cacd834ca/Cython-0.15.tar.gz
tar xf Cython-0.15.tar.gz
cd Cython-0.15
/opt/dionaea/bin/python3 setup.py install
echo $?

6.安装udns软件。
cd /root
wget http://pkgs.fedoraproject.org/repo/pkgs/udns/udns_0.0.9.tar.gz/md5/78843added6f6b690bc6019ab8ef03c9/udns_0.0.9.tar.gz
tar -xf udns_0.0.9.tar.gz
cd udns-0.0.9/
./configure
echo $?
make shared
echo $?
cp udns.h /opt/dionaea/include
cp *.so* /opt/dionaea/lib/
cd /opt/dionaea/lib/
ln -s libudns.so.0 libudns.so

7.安装libpcap软件。
cd /root
wget http://www.tcpdump.org/release/libpcap-1.1.1.tar.gz
tar xf libpcap-1.1.1.tar.gz
cd libpcap-1.1.1
./configure --prefix=/opt/dionaea
echo $?
make
echo $?
make install
echo $?

8.安装curl软件(建议使用yum安装)。
①源码安装curl。
cd /root
git clone https://github.com/bagder/curl.git curl
autoreconf -vi
yum -y install openssl-devel
yum -y install libssh2-devel
./configure --prefix=/opt/dionaea
yum -y install *gssapi*
make
make install
②yum安装。
yum -y install curl curl-devel

9.安装dionaea软件。
cd /root
git clone https://github.com/rep/dionaea.git dionaea
cd dionaea/
autoreconf -vi
echo $?

./configure --with-lcfg-include=/opt/dionaea/include/ \
--with-lcfg-lib=/opt/dionaea/lib/ -with-python=/opt/dionaea/bin/python3.2 \
--with-cython-dir=/opt/dionaea/bin --with-udns-include=/opt/dionaea/include/ \
--with-udns-lib=/opt/dionaea/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/
echo $?
上述./configure报错,类似如:no better than to read document。
解决方法:
yum -y install libgnomeui-devel
yum -y install *netlink-devel
yum -y install libnl*-devel
yum -y install openscap-devel
yum -y install loudmouth-devel

此处重新执行./configure命令,使用echo $?查看配置通过。
mv /usr/include/netlink/netlink.h /root/
*注释:此处如果不执行mv操作,make会报错。
make
echo $?
make install
echo $?
mv /root/netlink.h /usr/include/netlink/

11.启动dionaea软件。
groupadd dionaea
useradd -g dionaea -s /usr/sbin/nologin dionaea
chown -R dionaea:dionaea /opt/dionaea/
cd /opt/dionaea/bin
./dionaea -c /opt/dionaea/etc/dionaea/dionaea.conf -u dionaea -g dionaea &
netstat -antple|grep dionae

 


*安装python2.7.6
cd /root
wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
tar xf Python-2.7.6.tar.xz
cd Python-2.7.6
./configure --with-threads --enable-shared --prefix=/usr/local
echo $?
make
echo $?
make altinstall
echo $?
ln -s /usr/local/lib/libpython2.7.so.1.0 /lib64/


*安装setuptools和pip软件。
cd /root
wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz
tar xf setuptools-1.4.2.tar.gz
cd setuptools-1.4.2
python2.7 setup.py install

cd /root
wget --no-check-certificate https://github.com/pypa/pip/archive/8.1.2.tar.gz
tar xf 8.1.2.tar.gz
cd pip-8.1.2/
python2.7 setup.py install


*安装django软件。
cd /root
pip2.7 install Django pygeoip django-pagination django-tables2 django-compressor django-htmlmin django-filter
git clone https://github.com/benjiec/django-tables2-simplefilter.git django-tables2-simplefilter
cd django-tables2-simplefilter
python2.7 setup.py install


*安装netaddr软件。
cd /root
wget https://pypi.python.org/packages/b6/59/0310603662573a10e96537a2e329152599fa8b204f42d3de4599b7212e31/netaddr-0.7.11.tar.gz
tar xzvf netaddr-0.7.11.tar.gz
cd netaddr-0.7.11
python2.7 setup.py install

*安装pysubnettree
cd /root
git clone git://git.bro-ids.org/pysubnettree.git
cd pysubnettree/
python2.7 setup.py install


*安装nodejs软件。
cd /root
wget http://nodejs.org/dist/v0.8.16/node-v0.8.16.tar.gz
tar xf node-v0.8.16.tar.gz
cd node-v0.8.16
./configure
echo $?
make
echo $?
make install
echo $?
npm install -g less
cd /opt/
wget https://github.com/RootingPuntoEs/DionaeaFR/archive/master.zip -O DionaeaFR.zip
unzip DionaeaFR.zip
mv DionaeaFR-master/ DionaeaFR

posted @ 2016-07-15 10:50  韩德田  阅读(1939)  评论(2编辑  收藏