ubuntu12.04安装openvswitch1.9.3

来源:互联网 发布:姜文版程蝶衣 知乎 编辑:程序博客网 时间:2024/05/05 07:42

本安装是按照官网的安装步骤操作:

http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=INSTALL;hb=HEAD

安装之前确定安装gcc和ssl

apt-get install build-essentialapt-get install openssl
装好之后可以开始安装了:

1下载openvswitch:

http://openvswitch.org/download/

解压

tar -xzf openvswitch-1.9.3.tar.gz

2.进入目录后执行configure

./configure
3.建立linux内核模块

./configure --with-linux=/lib/modules/`uname -r`/build
4.使用root进行make

makemake install
5.安装modules

make modules_install/sbin/modprobe openvswitch
安装后,运行

/sbin/lsmod
如果成功则进行下一步,不成功参照官方文档运行。

6使用ovsdb-tool
配置数据库

 mkdir -p /usr/local/etc/openvswitch ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema
 ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \                     --remote=db:Open_vSwitch,Open_vSwitch,manager_options \                     --private-key=db:Open_vSwitch,SSL,private_key \                     --certificate=db:Open_vSwitch,SSL,certificate \                     --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \                     --pidfile --detach
如果没有SSL,则上面的命令去掉--private-key=db:Open_vSwitch,SSL,private_key \ --certificate=db:Open_vSwitch,SSL,certificate \ --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \
7.运行数据库

ovs-vsctl --no-wait initovs-vswitchd --pidfile --detach
如果没显示错误,恭喜你,安装成功!

原创粉丝点击