-
Notifications
You must be signed in to change notification settings - Fork 6
/
install_nfql.sh
40 lines (33 loc) · 903 Bytes
/
install_nfql.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
echo "Dependencies"
sudo apt-get update
sudo apt-get install iptables
sudo apt-get install autoconf
sudo apt-get install libtool
sudo apt-get install pkg-config
sudo apt-get install libmnl-dev
echo "Installing libnfnetlink and libnetfliter_queue"
cd
mkdir libs
cd libs
git clone git://git.netfilter.org/libnfnetlink.git
git clone git://git.netfilter.org/libnetfilter_queue.git
cd libnfnetlink
./autogen.sh
./configure --prefix=/usr
make
sudo make install
sudo apt-get install libmnl-dev
cd ..
cd libnetfilter_queue
./autogen.sh
./configure --prefix=/usr
make
sudo make install
echo "Done!"
# Following commands are needed to start the agents. Hence commented
# TODO Create new file
#sudo docker run -i -t --privileged --rm hadoop_ele
#gcc -Wall -o test mahout_agent.c -lnfnetlink -lnetfilter_queue -lpthread
#sudo iptables -A OUTPUT -p ip -j NFQUEUE --queue-num 0
#iptables –flush