1.安装依赖包
yum install gcc make python-devel openssl-devel kernel-devel graphviz \ kernel-debug-devel autoconf automake rpm-build redhat-rpm-config \ libtool
其中Autoconf必须要>=2.63版本
2.安装openvswitch(2.4.0版本为例)
下载2.4.0版本
mkdir -p /root/rpmbuild/SOURCES
cp openvswitch-2.4.0.tar.gz /root/rpmbuild/SOURCES
cd /root/rpmbuild/SOURCES
tar -zxvf openvswitch-2.4.0.tar.gz
3.rpm包制作
rpmbuild -bb --without check rhel/openvswitch.spec
rpmbuild -bb rhel/openvswitch-kmod-rhel6.spec
这一步可能会遇到如下问题:
3.1 依赖/usr/local/bin/python,在spec中增加Autoreq: 0
3.2 /etc/depmod.d/openvswitch.conf不存在,在openvswitch-kmod-rhel6.spec和spec.in中添加
%files
/lib/modules/2.6.32-358.18.1.el6.x86_64/extra/openvswitch/openvswitch.ko
/etc/depmod.d/openvswitch.conf
4.安装rpm包
rpm -ivh openvswitch-2.4.0-1.x86_64.rpm openvswitch-kmod-2.4.0-1.el6.x86_64.rpm
rpm -ivh kmod-openvswitch-2.4.0-1.el6.x86_64.rpm
5.启动openvswitch
modprobe openvswitch
/etc/init.d/openvswitch start
参考:
http://blog.csdn.net/bobpen/article/details/11478263
http://openvswitch.org/support/dist-docs-2.4/INSTALL.RHEL.md.html
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。