ovn编译

Posted dream397

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ovn编译相关的知识,希望对你有一定的参考价值。

 编译参考:https://github.com/ovn-org/ovn/blob/master/Documentation/intro/install/general.rst

 

 

 git clone http://github.com/openvswitch/ovs.git

 

yum -y install python3
 pip3 install six
[root@kunpeng82 ovs]# ls ~/rpmbuild/
BUILD  BUILDROOT  RPMS  SOURCES  SPECS  SRPMS
[root@kunpeng82 ovs]# 

./boot.sh
 

 

./configure --with-ovs-source=../rpmbuild/SOURCES/openvswitch-2.12.0/ --with-ovs-build=../rpmbuild/BUILD/openvswitch-2.12.0/   
make

报undefined reference to `ovs_cmdl_env_parse_all‘

1、 重新下载一个openvswitch-2.13.0

2、先编译openvswitch-2.13.0

3、./configure --with-ovs-source=../ovs  --with-ovs-build=../ovs

4、make -j 96  编译 ovn

5、make install

[root@kunpeng82 ovn]# export PATH=$PATH:/usr/local/share/ovn/scripts
[root@kunpeng82 ovn]# ovn-ctl start_northd
/usr/local/etc/ovn/ovnnb_db.db does not exist ... (warning).
Creating empty database /usr/local/etc/ovn/ovnnb_db.db [  OK  ]
/usr/local/etc/ovn/ovnsb_db.db does not exist ... (warning).
Creating empty database /usr/local/etc/ovn/ovnsb_db.db [  OK  ]
Starting ovn-northd [  OK  ]
[root@kunpeng82 ovn]# 
[root@kunpeng82 ovn]# export PATH=$PATH:/usr/local/share/ovn/scripts
[root@kunpeng82 ovn]# ovn-ctl start_northd
/usr/local/etc/ovn/ovnnb_db.db does not exist ... (warning).
Creating empty database /usr/local/etc/ovn/ovnnb_db.db [  OK  ]
/usr/local/etc/ovn/ovnsb_db.db does not exist ... (warning).
Creating empty database /usr/local/etc/ovn/ovnsb_db.db [  OK  ]
Starting ovn-northd [  OK  ]
[root@kunpeng82 ovn]# ovn-ctl start_controller
Starting ovn-controller [  OK  ]

 

[root@kunpeng82 ~]# ovn-ctl stop_controller
Exiting ovn-controller (15798) [  OK  ]
[root@kunpeng82 ~]# ovn-ctl stop_northd
Exiting ovn-northd (15732) [  OK  ]

 

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

 

以上是关于ovn编译的主要内容,如果未能解决你的问题,请参考以下文章

Build OpenVSwitch and OVN

set up ovn development env (by quqi99)

set up ovn development env (by quqi99)

set up ovn development env (by quqi99)

set up ovn development env (by quqi99)

set up ovn development env (by quqi99)