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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM