CentOs下安装Open vSwitch

环境

CentOs版本
[root@localhost SOURCES]# cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core) 

Open VSwitch(简称OVS)下载网址http://www.openvswitch.org/download/

本文选用最新的OVS版本2.11.1

安装教程

首先进入root环境

1.安装依赖

yum install wget openssl-devel  python-sphinx gcc make python-devel openssl-devel kernel-devel graphviz kernel-debug-devel autoconf automake rpm-build redhat-rpm-config libtool python-twisted-core python-zope-interface PyQt4 desktop-file-utils libcap-ng-devel groff checkpolicy selinux-policy-devel gcc-c++ python-six unbound unbound-devel -y

2.下载OVS安装包

wget https://www.openvswitch.org/releases/openvswitch-2.11.1.tar.gz

3.构建安装目录

mkdir -p ~/rpmbuild/SOURCES  #创建目录
mv openvswitch-2.11.1.tar.gz /root/rpmbuild/SOURCES/ #把安装包移动到目录下
cd /root/rpmbuild/SOURCES/  #切换目录
tar -xvzf openvswitch-2.11.1.tar.gz  #解压

4.构建 rpm 安装包

rpmbuild -bb --nocheck openvswitch-2.11.1/rhel/openvswitch-fedora.spec

5.安装OVS

yum localinstall /root/rpmbuild/RPMS/x86_64/openvswitch-2.11.1-1.el7.x86_64.rpm

6.启动相关服务

systemctl enable openvswitch.service
systemctl start openvswitch.service
systemctl status openvswitch.service

7.查看OVS

[root@localhost SOURCES]# ovs-vsctl --version
ovs-vsctl (Open vSwitch) 2.11.1
DB Schema 7.16.1

至此就算安装好了。

 

你可能感兴趣的:(Linux)