环境:
os: centos7
ovs: openvswitch-2.17.4
1.1 下载 openvswitch-2.17.4.tar.gz
,并解压到/root/openvswitch-2.17.4
1.2 安装gcc
yum install -y gcc
1.3 安装python3
yum install -y python3
进入到解压后的openvswitch-2.17.4
目录下,执行./configure
3.1. openvswitch-2.17.4
目录下继续执行make
(Run GNU make in the build directory)
3.2. openvswitch-2.17.4
目录下继续执行make install
(Run make install to install the executables and manpages into the running system, by default under /usr/local)
安装完成后,可以利用ovs-ctl
工具直接拉起ovsdb-server
和ovs-vswitchd
,ovs-ctl工具默认安装在/usr/local/share/openvswitch/scripts
目录下
依次执行如下两个命令
export PATH=$PATH:/usr/local/share/openvswitch/scripts
ovs-ctl start
执行ovs-vsctl show
可以查看到对应的版本号