-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
67 lines (52 loc) · 1.71 KB
/
install.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#/bin/bash
# Script that installs all the required dependencies for using the simulation
# framework and controllers. Please note that this script has to be executed
# as root!
# --- ANSI colour codes ---
INFO="\033[1;34m"
ERROR="\033[0;31m"
OK="\033[1;32m"
CLEAR="\033[0m"
#
# ========== Installing dependencies ==========
#
#echo -e "\n${INFO}[Installing required dependencies]${CLEAR}"
sudo apt install python
sudo apt install mininet
sudo apt install python-pip
sudo pip install --upgrade pip
sudo pip install ryu
sudo pip install pyyaml
sudo pip install numpy
#
# ========== Setup WAND repo for libtrace =========
#
echo -e "\n${INFO}[Installing libtrace]${CLEAR}"
sudo apt-get install curl apt-transport-https gnupg
curl -1sLf 'https://dl.cloudsmith.io/public/wand/libwandio/cfg/setup/bash.deb.sh' | sudo -E bash
curl -1sLf 'https://dl.cloudsmith.io/public/wand/libwandder/cfg/setup/bash.deb.sh' | sudo -E bash
curl -1sLf 'https://dl.cloudsmith.io/public/wand/libtrace/cfg/setup/bash.deb.sh' | sudo -E bash
sudo apt install libtrace4 libtrace4-dev libtrace4-tools libwandio-dev
#
# ========== Make sure the system is up to date ==========
#
echo -e "\n${INFO}[Updating system]${CLEAR}"
sudo apt update
sudo apt upgrade
#
# ========== Check that pktgen is wokring ==========
#
echo -e "\n${INFO}===== MAKE SURE NO ERRORS ARE REPORTED BETWEEN THESE SEPERATORS =====${CLEAR}"
echo -e "${OK}Loading PKTGEN kernel module${CLEAR}"
echo -ne "${ERROR}"
sudo modprobe pktgen
sudo rmmod pktgen
echo -ne "${CLEAR}"
echo -e "${INFO}=====================================================================${CLEAR}"
#
# ========== Compile loggers ===========
#
echo -e "\n${INFO}[Compiling libtrace loggers]${CLEAR}"
cd LibtraceLogger
make
cd ..