Skip to content

在CentOS 6 安装Open vSwitch from github

Published: at 00:00
安装依赖包
yum install gcc make git python-devel openssl-devel kernel-devel graphviz kernel-debug-devel autoconf automake rpm-build redhat-rpm-config libtool -y
设置正确的内核开发包
cd /lib/modules/`uname -r`
rm -rf build
ln -s /usr/src/kernels/2.6.32-573.8.1.el6.x86_64 build
安装autoconf
http://ftp.gnu.org/gnu/autoconf/
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz


tar zxvf autoconf-2.69.tar.gz
cd autoconf-2.69

./configure
make -j 4
make install
下载
git clone -b branch-2.4 https://github.com/openvswitch/ovs.git

一定要用branch-2.4, 不要问为什么,我撸了一下午的master, 2.4.90, 2.3.2了, 说多了都是泪...
生成dist包
cd ovs

./boot.sh
./configure
make dist
安装OVS
检查
service openvswitch start
service openvswitch status
lsmod | grep openvswitch
ovs-vsctl --version