使用源码安装ovs

声明:
本博客欢迎转载,但请保留原作者信息!
作者:柯晓东
团队:华为杭州OpenStack团队

为了使用openvswitch的新功能只好抛弃好用的apt-get,改用从源码安装openvswitch。
git clone http://github.com/openvswitch/ovs.git
cd ovs
./boot.sh
./configure --with-linux=/lib/modules/`uname -r`/build
make
make install
make INSTALL_MOD_DIR=kernel/net/openvswitch modules_install
modprobe -r vport_geneve
modprobe -r openvswitch
modprobe openvswitch
modprobe vport-geneve

重启机器后,需要执行以下命令才能继续使用ovs。当出现说...db.sock不存在的错误时,可以试试手动重拉db-server是否能够解决问题。

重拉的方法如下:

#创建conf.db
ovsdb-tool create conf.db /usr/local/share/openvswitch/vswitch.ovsschema

#启动db服务
ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,Open_vSwitch,manager_options --pidfile=/usr/local/var/run/openvswitch/ovsdb-server.pid --detach -vconsole:off --log-file --remote=ptcp:6640:127.0.0.1 /opt/stack/data/ovs/conf.db

#查看db.sock是否存在
ls /usr/local/var/run/openvswitch/db.sock
ovs-vsctl --no-wait init

更详细的帮助请看
http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=INSTALL;hb=HEAD

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值