zoukankan      html  css  js  c++  java
  • ubuntu12.04安装OVS

    1.下载openVswitch 

    ovs官网

    2.运行如下脚本

    #!/bin/bash
    cd /home/sdn/ovs/openvswitch-2.8.5
    rm /usr/local/etc/openvswitch/conf.db
    
    
    kill `cd /usr/local/var/run/openvswitch&& cat ovsdb-server.pid ovs-vswitchd.pid`
    
    rmmod openvswitch
    #./boot.sh
    #构建基于Linux内核的交换机。
    make clean
    ./configure --with-linux=/lib/modules/`uname -r`/build 2>/dev/null
    #编译并安装OVS 2.3.0。
    make
    
    make install 
    #我们需要安装并加载构建的内核模块。
    make modules_install
    #如果需要OVS支持VLAN功能,还需要加载openvswitch.ko模块,如果不需要,此步可以忽略。
    # modinfo ./datapath/linux/openvswitch.ko | grep depend
    modprobe nf_nat
    modprobe nf_nat_ipv6
    modprobe nf_nat_ipv4
    modprobe gre
    modprobe nf_conntrack
    modprobe ip_tunnel
    modprobe nf_defrag_ipv6
    modprobe libcrc32c
    modprobe nf_defrag_ipv4
    
    insmod datapath/linux/openvswitch.ko
    
    #insmod datapath/linux/openvswitch.ko
    
    modprobe openvswitch
    
    
    
    #使用ovsdb工具初始化配置数据库。
    mkdir -p /usr/local/etc/openvswitch
    ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema 
    
    ovsdb-server -v --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 --log-file
    ovs-vsctl --no-wait init
    ovs-vswitchd --pidfile --detach --log-file

    3.如果数据库连接失败,执行如下脚本

    #!/bin/bash
    chmod 777 /usr/var/run/openvswitch/db.sock
    ovsdb-server --remote=punix:/usr/var/run/openvswitch/db.sock 
                         --remote=db:Open_vSwitch,Open_vSwitch,manager_options 
                 --private-key=de:Open_vSwitch,SSL,private_key
                 --certificate=db:Open_vswitch,SSL,certificate
                 --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert
                         --pidfile --detach
    ovs-vsctl --no-wait init
    ovs-vswitchd --pidfile --detach

    4.出错位置记录

    装数据库那部分,注意创建的文件夹位置要正确

    参考链接:安装OVS 

  • 相关阅读:
    Sprinig.net 双向绑定 Bidirectional data binding and data model management 和 UpdatePanel
    Memcached是什么
    Spring.net 网络示例 codeproject
    jquery.modalbox.show 插件
    UVA 639 Don't Get Rooked
    UVA 539 The Settlers of Catan
    UVA 301 Transportation
    UVA 331 Mapping the Swaps
    UVA 216 Getting in Line
    UVA 10344 23 out of 5
  • 原文地址:https://www.cnblogs.com/gejuncheng/p/10064177.html
Copyright © 2011-2022 走看看