Revision 686a9993 util/install.sh

View differences:

util/install.sh
383 383
    sudo make install
384 384
}
385 385

  
386
# Install RYU
387
function ryu {
388
    echo "Installing RYU..."
389

  
390
    # install Ryu dependencies"
391
    $install autoconf automake g++ libtool python make
392
    if [ "$DIST" = "Ubuntu" ]; then
393
        $install libxml2 libxslt-dev python-pip python-dev
394
        sudo pip install gevent
395
    elif [ "$DIST" = "Debian" ]; then
396
        $install libxml2 libxslt-dev python-pip python-dev
397
        sudo pip install gevent
398
    fi
399

  
400
    # if needed, update python-six
401
    SIX_VER=`pip show six | grep Version | awk '{print $2}'`
402
    if version_ge 1.7.0 $SIX_VER; then
403
        echo "Installing python-six version 1.7.0..."
404
        sudo pip install -I six==1.7.0
405
    fi
406
    # fetch RYU
407
    cd $BUILD_DIR/
408
    git clone git://github.com/osrg/ryu.git ryu
409
    cd ryu
410

  
411
    # install ryu
412
    sudo python ./setup.py install
413

  
414
    # Add symbolic link to /usr/bin
415
    sudo ln -s ./bin/ryu-manager /usr/local/bin/ryu-manager
416
}
417

  
386 418
# Install NOX with tutorial files
387 419
function nox {
388 420
    echo "Installing NOX w/tutorial files..."
......
645 677
}
646 678

  
647 679
function usage {
648
    printf '\nUsage: %s [-abcdfhikmnprtvVwx03]\n\n' $(basename $0) >&2
680
    printf '\nUsage: %s [-abcdfhikmnprtvVwxy03]\n\n' $(basename $0) >&2
649 681

  
650 682
    printf 'This install script attempts to install useful packages\n' >&2
651 683
    printf 'for Mininet. It should (hopefully) work on Ubuntu 11.10+\n' >&2
......
672 704
    printf -- ' -v: install Open (V)switch\n' >&2
673 705
    printf -- ' -V <version>: install a particular version of Open (V)switch on Ubuntu\n' >&2
674 706
    printf -- ' -w: install OpenFlow (W)ireshark dissector\n' >&2
707
    printf -- ' -y: install R(y)u Controller\n' >&2
675 708
    printf -- ' -x: install NO(X) Classic OpenFlow controller\n' >&2
676 709
    printf -- ' -0: (default) -0[fx] installs OpenFlow 1.0 versions\n' >&2
677 710
    printf -- ' -3: -3[fx] installs OpenFlow 1.3 versions\n' >&2
......
684 717
then
685 718
    all
686 719
else
687
    while getopts 'abcdefhikmnprs:tvV:wx03' OPTION
720
    while getopts 'abcdefhikmnprs:tvV:wxy03' OPTION
688 721
    do
689 722
      case $OPTION in
690 723
      a)    all;;
......
717 750
            1.3) nox13;;
718 751
            *)  echo "Invalid OpenFlow version $OF_VERSION";;
719 752
            esac;;
753
      y)    ryu;;
720 754
      0)    OF_VERSION=1.0;;
721 755
      3)    OF_VERSION=1.3;;
722 756
      ?)    usage;;

Also available in: Unified diff