zoukankan      html  css  js  c++  java
  • centos安装mininet 和卸载

    稳定版本:

    mininet==2.2.2
    ~/mininet

    "RedHatEnterpriseServer"的地方添加 CentOS
    DIST=`lsb_release -is`
    [root@kunpeng82 util]# lsb_release -is
    CentOS
    [root@kunpeng82 util]# 

    pip install pexpect
    [root@kunpeng82 mininet]# pip uninstall mininet
    DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
    Found existing installation: mininet 2.2.2
    Uninstalling mininet-2.2.2:
      Would remove:
        /usr/bin/mn
        /usr/lib/python2.7/site-packages/mininet-2.2.2-py2.7.egg
    Proceed (y/n)? n
    [root@kunpeng82 mininet]# git branch -d 2.2.0
    error: branch '2.2.0' not found.
    [root@kunpeng82 mininet]# git checkout 2.2.0
    HEAD is now at c75eb47... 2.2.0rc1 -> 2.2.0
    [root@kunpeng82 mininet]# make install
    cc -Wall -Wextra  -DVERSION="`PYTHONPATH=. bin/mn --version`" mnexec.c -o mnexec
    PYTHONPATH=. help2man -N -n "create a Mininet network." 
    --no-discard-stderr bin/mn -o mn.1
    help2man -N -n "execution utility for Mininet." 
    -h "-h" -v "-v" --no-discard-stderr ./mnexec -o mnexec.1
    install mnexec /usr/bin
    install mn.1 mnexec.1 /usr/share/man/man1

    =======================================================================================================================

    #$install cgroup-tools || $install cgroup-bin
    换成
    
    $install libcgroup libcgroup-tools
    yum -y install libcgroup libcgroup-tools
    增加
    test -e /etc/centos-release && DIST="CentOS" if [ "$DIST" = "CentOS" ]; then install='sudo yum -y install' remove='sudo yum -y erase' pkginst='sudo rpm -ivh' # Prereqs for this script if ! which lsb_release &> /dev/null; then $install redhat-lsb-core fi fi test -e /etc/SuSE-release && DIST="SUSE Linux"
    修改
    DISTS='Ubuntu|Debian|Fedora|RedHatEnterpriseServer|SUSE LINUX'


    DISTS='Ubuntu|Debian|Fedora|RedHatEnterpriseServer|SUSE LINUX|CentOS' if ! echo $DIST | egrep "$DISTS" >/dev/null; then echo "Install.sh currently only supports $DISTS." exit 1 fi
    #mininet/util/install.sh[options]
    这里典型的[options]主要有下面几种:
    “-a”:完整安装包括Mininet VM,还包括如Open vSwitch的依赖关系,以及像的OpenFlow Wireshark分离器和POX。默认情况下,这些工具将被安装在你的home目录中。
    “-nfv”:安装Mininet、基于OpenFlow的交换机和Open vSwitch。
    “-s mydir” :在其他选项使用前使用此选项可将源代码建立在一个指定的目录中,而不是在你的home目录。
    # install.sh –a        ##完整安装(默认安装在home目录下)
    # install.sh -s mydir –a        ##完整安装(安装在其他目录) 
    # install.sh –nfv        ##安装Mininet+用户交换机+OVS(安装在home目录下)        
    # install.sh -s mydir –nfv            ##安装Mininet+用户交换机+OVS(安装在其他目录下)
    mininet/util/install.sh -nf
    [root@kunpeng82 mininet]# mininet/util/install.sh -h
    Detected Linux distribution: CentOS 7.8.2003 AltArch aarch64
    sys.version_info(major=2, minor=7, micro=5, releaselevel='final', serial=0)
    Detected Python (python) version 2
    
    Usage: install.sh [-abcdfhikmnprtvVwxy03]
    
    This install script attempts to install useful packages
    for Mininet. It should (hopefully) work on Ubuntu 11.10+
    If you run into trouble, try
    installing one thing at a time, and looking at the 
    specific installation function in this script.
    
    options:
     -a: (default) install (A)ll packages - good luck!
     -b: install controller (B)enchmark (oflops)
     -c: (C)lean up after kernel install
     -d: (D)elete some sensitive files from a VM image
     -e: install Mininet d(E)veloper dependencies
     -f: install Open(F)low
     -h: print this (H)elp message
     -i: install (I)ndigo Virtual Switch
     -k: install new (K)ernel
     -m: install Open vSwitch kernel (M)odule from source dir
     -n: install Mini(N)et dependencies + core files
     -p: install (P)OX OpenFlow Controller
     -r: remove existing Open vSwitch packages
     -s <dir>: place dependency (S)ource/build trees in <dir>
     -t: complete o(T)her Mininet VM setup tasks
     -v: install Open (V)switch
     -V <version>: install a particular version of Open (V)switch on Ubuntu
     -w: install OpenFlow (W)ireshark dissector
     -y: install R(y)u Controller
     -x: install NO(X) Classic OpenFlow controller
     -0: (default) -0[fx] installs OpenFlow 1.0 versions
     -3: -3[fx] installs OpenFlow 1.3 versions
    [root@kunpeng82 mininet]# 
    [root@kunpeng82 mininet]# mn --version
    2.3.0d6
    [root@kunpeng82 mininet]# 
    [root@kunpeng82 mininet]#  mn --test pingall
    *** Creating network
    *** Adding controller
    *** Adding hosts:
    h1 h2 
    *** Adding switches:
    s1 
    *** Adding links:
    (h1, s1) (h2, s1) 
    *** Configuring hosts
    h1 h2 
    *** Starting controller
    c0 
    *** Starting 1 switches
    s1 ...
    *** Waiting for switches to connect
    s1 
    *** Ping: testing ping reachability
    h1 -> h2 
    h2 -> h1 
    *** Results: 0% dropped (2/2 received)
    *** Stopping 1 controllers
    c0 
    *** Stopping 2 links
    ..
    *** Stopping 1 switches
    s1 
    *** Stopping 2 hosts
    h1 h2 
    *** Done
    completed in 1.459 seconds
    [root@kunpeng82 mininet]#
    [root@kunpeng82 mininet]# mn --version
    2.3.0d6
    [root@kunpeng82 mininet]#  mn --test pingall
    *** Creating network
    *** Adding controller
    *** Adding hosts:
    h1 h2 
    *** Adding switches:
    s1 
    *** Adding links:
    (h1, s1) (h2, s1) 
    *** Configuring hosts
    h1 h2 
    *** Starting controller
    c0 
    *** Starting 1 switches
    s1 ...
    *** Waiting for switches to connect
    s1 
    *** Ping: testing ping reachability
    h1 -> h2 
    h2 -> h1 
    *** Results: 0% dropped (2/2 received)
    *** Stopping 1 controllers
    c0 
    *** Stopping 2 links
    ..
    *** Stopping 1 switches
    s1 
    *** Stopping 2 hosts
    h1 h2 
    *** Done
    completed in 1.459 seconds
    [root@kunpeng82 mininet]# mn
    *** Creating network
    *** Adding controller
    *** Adding hosts:
    h1 h2 
    *** Adding switches:
    s1 
    *** Adding links:
    (h1, s1) (h2, s1) 
    *** Configuring hosts
    h1 h2 
    *** Starting controller
    c0 
    *** Starting 1 switches
    s1 ...
    *** Starting CLI:
    mininet> quit-------------------退出
    *** Stopping 1 controllers
    c0 
    *** Stopping 2 links
    ..
    *** Stopping 1 switches
    s1 
    *** Stopping 2 hosts
    h1 h2 
    *** Done
    completed in 33.922 seconds
    [root@kunpeng82 mininet]#
    No package ssh available.
    Package iperf-2.0.13-1.el7.aarch64 already installed and latest version
    Package 1:telnet-0.17-65.el7_8.aarch64 already installed and latest version
    Package 2:ethtool-4.8-10.el7.aarch64 already installed and latest version
    Package help2man-1.41.1-3.el7.noarch already installed and latest version
    Package python2-pyflakes-1.6.0-4.el7.noarch already installed and latest version
    Package pylint-1.6.5-6.el7.noarch already installed and latest version
    No package pep8 available.
    Package python-setuptools-0.9.8-7.el7.noarch already installed and latest version
    No package python-pexpect available.
    No package python-tk available.
    Nothing to do
    Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager
    
    This system is not registered with an entitlement server. You can use subscription-manager to register.
    
    Repository base is listed more than once in the configuration
    Repository updates is listed more than once in the configuration
    Repository extras is listed more than once in the configuration
    Repository centosplus is listed more than once in the configuration
    Loading mirror speeds from cached hostfile
    No package iproute2 available.

    卸载

    [root@kunpeng82 mininet]# pip list | grep mininet
    DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
    mininet                          2.3.0d6
    [root@kunpeng82 mininet]# pip uninstall mininet
  • 相关阅读:
    Java 的垃圾回收机制
    Java 变参函数的实现
    对已知有限集合中缺失或重复元素的查找
    Java 旋转数组查找旋转点和任意元素(元素可重复)
    第三章 磁盘分区
    第二章 一切都是对象
    发布 AutoRssReceiver Console 机器人! 兼讲: .Net 中的 Attribute (特性)
    .Net/C#/VB/TSQL/Java 实现: 将天文数字转换成中文大写 (2000 年前的思路,打劫的,一点儿技术含量都没有)
    .Net/C#/VB/TSQL/Java/Script 实现: 将天文数字转换成中文大写 (2000 年前的思路,打劫的,一点儿技术含量都没有)
    利用"委托"实现类的对象实例按"多字段嵌套"排序
  • 原文地址:https://www.cnblogs.com/dream397/p/12944743.html
Copyright © 2011-2022 走看看