码迷,mamicode.com
首页 > 其他好文 > 详细

Build OpenVSwitch and OVN

时间:2017-06-30 18:45:43      阅读:323      评论:0      收藏:0      [点我收藏+]

标签:name   service   redhat   pytho   evel   lin   kernal   dev   track   

OVN 作为OpenVSwitch的功能模块,每次OVN与OpenVSwitch一起发布,OVN与OpenVSwitch源代码放在ovs代码库:https://github.com/openvswitch/ovs.git

Build OpenVSwitch and OVN

 1 # *Linux Environment: CentOS 73.10.0-327.18.2.el7.x86_64)
 2   
 3 # Install depen package
 4 yum install gcc make python-devel openssl-devel kernel-devel graphviz  5     kernel-debug-devel autoconf automake rpm-build redhat-rpm-config  6     libtool checkpolicy selinux-policy-devel
 7   
 8 # Download code
 9 git clone https://github.com/openvswitch/ovs.git
10   
11 # Start build
12 cd $OVS_DIR
13 # Bootstrapping
14 ./boot.sh
15 # Configuring (special --prefix and --with-linux  e.g  ./configure  --with-linux=/lib/modules/$(uname -r)/build)
16 ./configure
17 #Build
18 make
19   
20 # 安装方式一 源代码安装
21  make install
22 ## Install kernel modules
23  make modules_install
24 ## Start service
25 ### Start openvswitch service
26 /usr/local/share/openvswitch/scripts/ovs-ctl start --system-id=random
27 ### Start ovn-northd
28 /usr/local/share/openvswitch/scripts/ovn-ctl start_northd
29 ### Start ovn-controller
30 /usr/local/share/openvswitch/scripts/ovn-ctl start_controller
31   
32 # 安装方式二 RPM包安装
33 ## Package RPM openvswitch and ovn
34 make rpm-fedora RPMBUILD_OPT="--without check"
35 ## Build kernel OVS Tree Datapath (specila kernal version, e.g  make rpm-fedora-kmod RPMBUILD_OPT=-D "kversion 4.3.4-300.fc23.x86_64")
36 make rpm-fedora-kmod
37 ## Look for rpm from $OVS_DIR/rpm/rpmbuild/RPMS/x86_64
38 ### Install kernel OVS Tree Datapath
39 yum localinstall openvswitch-kmod-2.6.90-1.el7.centos.x86_64.rpm
40 ### Install OVS
41 yum localinstall openvswitch-2.6.90-1.el7.centos.x86_64.rpm
42 ### Install OVN
43 #### Install ovn common package
44 yum localinstall openvswitch-ovn-common-2.6.90-1.el7.centos.x86_64.rpm
45 #### Install ovn northd service
46 yum localinstall openvswitch-ovn-central-2.6.90-1.el7.centos.x86_64.rpm
47 #### Install ovn controller service
48 yum localinstall openvswitch-ovn-host-2.6.90-1.el7.centos.x86_64.rpm
49 ## Start service
50 ### Start openvswitch service
51 systemctl start openvswitch.service
52 ### Start ovn-northd
53 systemctl start ovn-northd
54 ### Start ovn-controller
55 systemctl start ovn-controller

 

使用NAT功能(基于Connection tracking),需要安装OVS Tree Datapath。

技术分享

技术分享

 

 

参考文档

     https://github.com/openvswitch/ovs/blob/master/Documentation/faq/releases.rst

     https://github.com/openvswitch/ovs/blob/master/Documentation/intro/install/fedora.rst

Build OpenVSwitch and OVN

标签:name   service   redhat   pytho   evel   lin   kernal   dev   track   

原文地址:http://www.cnblogs.com/gaozhengwei/p/7100140.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!