黑龙江快乐十分

文章标题

2/13/2017来源:经验技巧人气:17125

重新部署 SDN 实验 系统

成文时间 2017年2017年2月13日

软件配置 VMware WorkStation 版本 12.5.2 作者信息 白威挺

youyuzaiyuanbanbenxitongzhongyunxing open vswitch cunzaiwenti,guerjiang sdn yanzhengyongde ubuntu jinxingzhongzhuang。xianzaizhengliyixiazhongxinanzhuangdesilu。


目录

黑龙江快乐十分 zhongxinbushu sdn shiyan ubuntu xitong mulu anzhuang yunxingxitonggengxin anzhuang vmware tools anzhuang jdk anzhuang opendaylight anzhuang open vswitch ovs yu odl lianjie


安装操作系统

黑龙江快乐十分xiazaizuixinde ubuntu desktop 16.04.01 lts xitong,xinjianyigexuniji,binganzhaomorenbuzhoujinxinganzhuang。zhuyi,ruguomeiyouwangluojiubuyaogouxuanlianwanggengxin,fouzehuikazai adobe player deanzhuangshang,henjiucainengjieshuanzhuang。

推荐配置 处理器:至少 4 核 1 GHz 内存:至少 4 GB 硬盘:至少 40 GB

进入系统后修改root用户的默认密码,执行如下命令:

sudo passwd root

输入当前用户密码和两次root用户密码即可。


运行系统更新

root权限下执行如下命令:

apt-get update apt-get upgrade

这是一个比较漫长的过程,特别是在网络条件比较差的情况下。推荐在root权限下使用清华或阿里的镜像进行更新,具体命令如下:

cp /etc/apt/sources.list /etc/apt/sources.list.old # 备份 gedit /etc/apt/source.list

shiyongruxiayuantihuanwenjianneirong(renxuanyi):

# 清华源 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main multiverse restricted universe deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main multiverse restricted universe deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-oposed main multiverse restricted universe deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main multiverse restricted universe deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main multiverse restricted universe deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main multiverse restricted universe deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main multiverse restricted universe deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main multiverse restricted universe deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main multiverse restricted universe deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main multiverse restricted universe # 阿里源 deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse

安装 Vmware Tools

在虚拟机控制器中选择安装 Vmware Tools,然后在root下运行如下命令:

cp /media/你的用户名/VMware\ Tools/VMwareTools-10.0.10-4301679.tar.gz /home/你的用户名/VmwareTools.tar.gz tar zxvf /home/你的用户名/VmwareTools.tar.gz cd vmware-tools-distrib ./vmware-install.pl

一路默认安装即可。注意,系统会提示这是一个legacy黑龙江快乐十分版本,但是你还是需要安装它才能正常使用 Vmware Tools 的功能。


安装 JDK

下载 JDK 8u121 到/home/你的用户名下,然后在root下执行如下命令:

cd /usr mkdir cp /home/你的用户名/jdk-8u121--x64.tar.gz /usr/java/ cd java tar zxvf jdk-8u121-linux-x64.tar.gz # 得到文件夹 jdk1.8.0_121 gedit /etc/profile # 修改系统配置文件达到所有用户可用的目的

黑龙江快乐十分zaiwenjianmoweitianjiaruxianeirong:

JAVA_HOME=/usr/java/jdk1.8.0_121 CLASSPATH=$JAVA_HOME/lib/ PATH=$PATH:$JAVA_HOME/bin export PATH JAVA_HOME CLASSPATH

zhixingruxiaminglinggengxinxitongpeizhixinxi:

source /etc/profile

黑龙江快乐十分chakandangqian jdk banbenxinxi:

java -version

ruguochuxianruxiaxinxishuominganzhuangchenggong:

java version "1.8.0_121" Java(TM) SE Runtime Environment (build 1.8.0_121-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

安装 OpenDaylight

下载 OpenDaylight Boron SR2 到/home/你的用户名下,然后在root下执行如下命令:

cd /usr mkdir opendaylight cp /home/你的用户名/distribution-karaf-0.5.2-Boron-SR2.tar.gz /usr/opendaylight/ cd opendaylight tar distribution-karaf-0.5.2-Boron-SR2.tar.gz # 得到文件夹 distribution-karaf-0.5.2-Boron-SR2

然后修改karaf参数配置:

cd distribution-karaf-0.5.2-Boron-SR2 gedit etc/org.apache.karaf.management.cfg

jiang

rmiRegistryHost = 0.0.0.0 rmiServerHost = 0.0.0.0

gaiwei

rmiRegistryHost = 127.0.0.1 rmiServerHost = 127.0.0.1

suihouqidong opendaylight anzhuang feature:

./bin/karaf karaf

黑龙江快乐十分zai odl kongzhitaixiaanzhuangruxiatezheng:

feature:install odl-restconf feature:install odl-l2switch-switch-ui feature:install odl-openflowplugin-flow-services-ui feature:install odl-mdsal-apidocs feature:install odl-dlux-core feature:install odl-dlux-node feature:install odl-dlux-yangui

ranhoushiyong liulanqi(ruguonianzhuangleqitadeliulanqiyekeyi,liru )dakai http://127.0.0.1:8181/index.html。ruguoniyougongwang huozheshishiyanwangluo ip yekeyi。benwenhuanjingweiyubendi,yibendiweilijinxingshuoming。ruguochuxianledenglujiemian,gongxiniwanchengle opendaylight boron banbendejibenanzhuang。

万一失败了呢 如果安装失败,请不要着急。在 ODL 控制台下使用logout命令退出,然后删除/data目录。命令如下:

rm -rf /usr/opendaylight/distribution-karaf-0.5.2-Boron-SR2/data

然后使用安全模式运行karaf

cd /usr/opendaylight/distribution-karaf-0.5.2-Boron-SR2/bin ./karaf clean

suihouanzhaobuzhouzhongxinanzhuangjike。


安装 Open vSwitch

黑龙江快乐十分genjuanzhuangfangshikefenweiyixialiangzhong:

tongguoyuandaimaanzhuang

确保正确的编译环境。执行命令apt-get updateapt-get install -y build-essential来构建编译环境。

xiazai ovs anzhuangbao。zhixingmingling

wget http://openvswitch.org/releases/openvswitch-2.6.1.tar.gz

jieyaanzhuangbao。zhixingmingling

cd /usr mkdir openvswitch cp /home/你的用户名/openvswitch-2.6.1.tar.gz /usr/openvswitch cd openvswitch tar xzvf openvswitch-2.6.1.tar.gz

jinrujieyahoudewenjianjia。zhixingmingling

cd openvswitch-2.6.1

清理 make黑龙江快乐十分 命令的缓存。执行命令

make clean

黑龙江快乐十分duibianyitiaojianjinxingpeizhi,jutixinxicanjianovs guanfangpeizhishuoming。benwenjiang ovs bianyiweineihemokuai,yincipeizhiminglingwei

./configure --with-linux=/lib/modules/$(uname -r)/build

bianyibinganzhuang ovs。zhixingmingling

make && make install

如果编译为内核模块,需要执行命令可选操作

make modules_install

如果需要加载其他内核模块,请执行命令可选操作

config_file="/etc/depmod.d/openvswitch.conf" for module in datapath/linux/*.ko; do modname="$(basename ${module})" echo "override ${modname%.ko} * extra" >> "$config_file" echo "override ${modname%.ko} * weak-updates" >> "$config_file" done depmod -a /sbin/modprobe openvswitch

chushihua ovs 。zhixingmingling

mkdir -p /usr/local/etc/openvswitch ovsdb-tool create /usr/local/etc/openvswitch/conf.db \ vswitchd/vswitch.ovsschema

黑龙江快乐十分liyongshujukuqidong ovs。zhixingmingling

mkdir -p /usr/local/var/run/openvswitch ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \ --remote=db:Open_vSwitch,Open_vSwitch,manager_options \ --private-key=db:Open_vSwitch,SSL,private_key \ --certificate=db:Open_vSwitch,SSL,certificate \ --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \ --pidfile --detach --log-file

diyiciqidongdeshihouzhixingmingling

ovs-vsctl --no-wait init

黑龙江快乐十分qidong ovs shouhujincheng,zhixingmingling

ovs-vswitchd --pidfile --detach --log-file

通过apt-get安装

执行命令,将自动安装 ovs 2.5.0 版本。 截至本文成稿

apt-get openvswitch-switch

黑龙江快乐十分ruguoxuyaoguanbi open vswitch zekezhixingyixiamingling:

kill `cd /usr/local/var/run/openvswitch && cat ovsdb-server.pid ovs-vswitchd.pid`

如果需要重新开启的话还是需要从代码安装的第 11 步开始向后执行,即利用数据库启动 OVS第一次启动启动 OVS 守护进程


OVS 与 ODL 连接

本小节假设 ODL 安装在本地,IP 地址为 127.0.0.1,ODL 控制端口为 6633

ceshilianjiebuzhouyiciwei:

qidong odl,minglingwei

cd distribution-karaf-0.4.2-Beryllium-SR2/bin ./karaf

登陆 WEB 页面 http://127.0.0.1:8181/index.html,进入拓扑查看界面。默认账户密码均为 admin

qidongwangqiao,zhixingmingling

ovs-vsctl add-br br0

jiangwangqiao br0 lianjiedao odl kongzhiqi,zhixingmingling

ovs-vsctl set-controller br0 tcp:127.0.0.1:6633

黑龙江快乐十分yishangjiuyinggainengzaituopujiemianxiakandaolianjiedejiaohuanji。



优质网站模板

  • 1
  • 2
  • 3

操作系统文章分类

最新文章推荐

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

操作系统推荐

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10