-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall_demo.sh
101 lines (89 loc) · 1.92 KB
/
install_demo.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/bin/sh
#
# dependencies
#
sudo apt-get update
sudo apt-get -y install \
vlc wmaker pyflakes xserver-xorg-video-vmware xinit \
libgoo-canvas-perl libcanberra-gtk-module
sudo apt-get clean
#
# VirtualBox Guest Additions
#
sudo mount /dev/cdrom2 /mnt
cd /mnt
if [ -f ./VBoxLinuxAdditions.run ]; then
sudo ./VBoxLinuxAdditions.run
else
sudo apt-get -y install virtualbox-guest-additions
fi
#
# OF softswitch with BME extensions
#
SS=of11softswitch.bme
SS_DIR=~/$SS
cd
git clone -b sigcomm2012 git://github.com/nemethf/of11softswitch.git $SS
cd $SS_DIR
./boot.sh
./configure
make
sudo make install
make clean
#
# nox & demo application
#
cd
NOX=nox11oflib
APP=sigcomm2012/butterfly_app
NOX_DIR=~/$NOX
APP_DIR=$NOX_DIR/src/nox/coreapps/butterfly_app
git clone git://github.com/TrafficLab/nox11oflib.git
git clone -b master git://github.com/nemethf/sigcomm2012.git
# linking doesn't work, so we must copy:
cp -a ~/$APP $APP_DIR
cd $APP_DIR
./install.sh $NOX_DIR $SS_DIR
cd $NOX_DIR
./boot.sh
./configure
make
sudo make install
#
# mininet
#
MININET=mininet.bme
cd
git clone -b master git://github.com/nemethf/mininet.git $MININET
cd $MININET
sudo make install
#
# video files
#
#
# misc
#
sudo rm -f /etc/udev/rules.d/70-persistent-net.rules
cat <<EOF | sudo tee -a /etc/issue
sigcomm2012 demo
================
username: openflow
password: openflow
EOF
cat >> ~/.bashrc <<EOF
export NOX_CORE_DIR=$NOX_DIR/src
EOF
export NOX_CORE_DIR=$NOX_DIR/src
WM_DIR=~/GNUstep/Library/WindowMaker
mkdir -p $WM_DIR
cat >> $WM_DIR/autostart <<EOF
xterm -geometry +0+0 -T Mininet -e sudo -E mn --custom $APP_DIR/butterfly.py &
emacs --no-splash -f tool-bar-mode -g 70x23-0+0 $APP_DIR/walkthrough.org &
EOF
chmod u+x $WM_DIR/autostart
INFO="You can start the demo by typing: startx"
echo echo $INFO >> ~/.profile
cat <<EOF
Because of the newly installed VirtualBox Guest Additions, it's not a
bad idea to reboot now, but otherwise the demo VM image is ready.
EOF