在 Centos 上安装 ovs

安装ovs之前,先保证如下软件已被安装:

#yum -y install make gcc openssl-devel autoconf automake rpm-build redhat-rpm-config python-devel openssl-devel kernel-devel kernel-debug-devel libtool wget

 必要的设置步骤:

#mkdir -p ~/rpmbuild/SOURCES
#wget http://openvswitch.org/releases/openvswitch-2.5.1.tar.gz
#cp openvswitch-2.5.1.tar.gz ~/rpmbuild/SOURCES/
#tar xfz openvswitch-2.5.1.tar.gz
#sed 's/openvswitch-kmod, //g' openvswitch-2.5.1/rhel/openvswitch.spec > openvswitch-2.5.1/rhel/openvswitch_no_kmod.spec

Build RPM

#rpmbuild -bb --nocheck ~/openvswitch-2.5.1/rhel/openvswitch_no_kmod.spec

安装RPM 

#ls -l ~/rpmbuild/RPMS/x86_64/
#yum localinstall ~/rpmbuild/RPMS/x86_64/openvswitch-2.5.1-1.x86_64.rpm
Start the OVS service and enable it for the next boot

安装后设置

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

 安装Policycoreutils

#yum install policycoreutils-python.x86_64 0:2.2.5-11.el7

#restorecon -Rv /etc/openvswitch

 启动 OVS

#systemctl start openvswitch.service
#systemctl -l status openvswitch.service
  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值