go.dedis.ch/onet/v4@v4.0.0-pre1/simul/platform/mininet/install_mininet.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  # Package installation
     4  echo 'export LC_ALL="en_US.UTF-8"' >> /etc/environment
     5  . /etc/environment
     6  apt-get update
     7  apt-get install -y screen rsync software-properties-common git vim cifs-utils pv htop mtr \
     8  golang-1.6 aufs-tools ca-certificates xz-utils btrfs-tools \
     9  debootstrap lxc rinse psmisc
    10  
    11  # Configure ssh-port-forwarding
    12  echo GatewayPorts yes >> /etc/ssh/sshd_config
    13  /etc/init.d/ssh restart
    14  
    15  case "$( cat /etc/issue )" in
    16  *14.04*)
    17      echo "Installing for Ubuntu 1404"
    18      # Mininet installation
    19      git clone git://github.com/mininet/mininet
    20      cd mininet
    21      git checkout 2.2.1
    22      ./util/install.sh -a
    23      ;;
    24  *16.04*)
    25      echo "Installing for Ubuntu 1604"
    26      apt-get install -y mininet openvswitch-testcontroller
    27      cp /usr/bin/ovs-testcontroller /usr/bin/ovs-controller
    28      ;;
    29  *)
    30      echo "Unknown system - only know Ubuntu 1404 and 1604!"
    31      ;;
    32  esac