blob: 382945e0916464f0fa3ebac1da314f17892613d9 [file] [log] [blame]
carlosmscabralf40ecd12013-02-01 18:15:58 -02001#!/bin/bash
2
3# This script is intended to install Mininet into
4# a brand-new Ubuntu virtual machine,
5# to create a fully usable "tutorial" VM.
6set -e
7echo `whoami` ALL=NOPASSWD: ALL | sudo tee -a /etc/sudoers
8sudo sed -i -e 's/Default/#Default/' /etc/sudoers
9sudo sed -i -e 's/ubuntu/mininet-vm/' /etc/hostname
10sudo sed -i -e 's/ubuntu/mininet-vm/g' /etc/hosts
11sudo hostname `cat /etc/hostname`
12sudo sed -i -e 's/quiet splash/text/' /etc/default/grub
13sudo update-grub
14sudo sed -i -e 's/us.archive.ubuntu.com/mirrors.kernel.org/' \
15 /etc/apt/sources.list
16sudo apt-get update
17# Clean up vmware easy install junk if present
18if [ -e /etc/issue.backup ]; then
19 sudo mv /etc/issue.backup /etc/issue
20fi
21if [ -e /etc/rc.local.backup ]; then
22 sudo mv /etc/rc.local.backup /etc/rc.local
23fi
24# Install Mininet
25sudo apt-get -y install git-core openssh-server
26git clone git://github.com/mininet/mininet
27cd mininet
28cd
29time mininet/util/install.sh
30# Ignoring this since NOX classic is deprecated
31#if ! grep NOX_CORE_DIR .bashrc; then
32# echo "export NOX_CORE_DIR=~/noxcore/build/src/" >> .bashrc
33#fi
34echo <<EOF
35You may need to reboot and then:
36sudo dpkg-reconfigure openvswitch-datapath-dkms
37sudo service openvswitch-switch start
38EOF
39
40