Revision 7a106d9b

View differences:

util/vm/install-mininet-vm.sh
1
#!/bin/bash
2

  
3
# This script is intended to install Mininet into
4
# a brand-new Ubuntu (10.04 or 11.10) virtual machine,
5
# to create a fully usable "tutorial" VM.
6

  
7
set -e
8
sudo sh -c 'cat >> /etc/sudoers' <<EOF
9
openflow ALL=NOPASSWD: ALL
10
EOF
11
sudo sed -i -e 's/Default/#Default/' /etc/sudoers
12
sudo sed -i -e 's/ubuntu/mininet-vm/' /etc/hostname
13
sudo sed -i -e 's/ubuntu/mininet-vm/g' /etc/hosts
14
sudo hostname `cat /etc/hostname`
15
sudo sed -i -e 's/quiet splash/text/' /etc/default/grub
16
sudo update-grub
17
sudo sed -i -e 's/us.archive.ubuntu.com/mirrors.kernel.org/' \
18
	/etc/apt/sources.list
19
sudo apt-get update
20
sudo apt-get -y install git-core openssh-server
21
git clone git://github.com/mininet/mininet
22
cd mininet
23
# Currently ovs-1.4-compat; will change to testing or master
24
git checkout -b 1.4 origin/devel/ovs-1.4-compat
25
cd
26
time mininet/util/install.sh
27
echo <<EOF
28
You may need to reboot and then:
29
sudo dpkg-reconfigure openvswitch-datapath-dkms
30
sudo service openvswitch-switch start
31
EOF
32

  
33

  

Also available in: Unified diff