#$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]#