Install open vswitch (ovs) through source code on Ubuntu 12.04)

Source: Internet
Author: User
Tags openvswitch

Install Ubuntu 12.04 and update the system

Apt-getupdate;

Apt-getupgrade;

 

Install the required package

Apt-Get install automake Autoconf gcc uml-utilities libtool build-essential PKG-config Linux-headers-'uname-R'

 

Download the source code package of open vswich

Wget http://openvswitch.org/releases/openvswitch-1.10.0.tar.gz.

 

Compile open vswitch

(To build the Linux kernel module, so that you can run Thekernel-based switch, pass the location of the kernel build directory on -- With-Linux)

$ Tar-xvf openvswitch-1.10.0.tar.gz

$ Openvswitch-1.10.0 CD

$./Boot. Sh

$./Configure -- With-Linux =/lib/modules/'uname-R'/build

$ Make

$ Make install

# Load the ovs kernel module

$ Insmod datapath/Linux/openvswitch. Ko

 

Initialize the ovs configuration file and love you

$ Touch/usr/local/etc/ovs-vswitchd.conf

$ Mkdir-P/usr/local/etc/openvswitch

$ Ovsdb-tool create/usr/local/etc/openvswitch/CONF. DB vswitchd/vswitch. ovsschema

 

Start ovsdb-Server

$ Ovsdb-server/usr/local/etc/openvswitch/CONF. DB -- remote = punix:/usr/local/var/run/openvswitch/DB. sock -- remote = DB: open_vswitch, manager_options -- private-Key = DB: SSL, private_key -- certificate = DB: SSL, certificate -- Bootstrap-ca-Cert = DB: SSL, ca_cert -- pidfile -- detach -- log-File

 

Start ovs

# Only need to run this the first time.

$ Ovs-vsctl -- no-Wait init

# Start vswitch

$ Ovs-vswitchd -- pidfile -- detach

 

One of my scripts for starting ovs

$! /Bin/bash

Sudo insmod/home/<yourname>/openvswitch-1.10.0/datapath/Linux/openvswitch. Ko

 

Screen-DMs Stack

 

# Start ovsdb

Screen-s stack-x screen-T ovsdb

Screen-s stack-P ovsdb-x exec ovsdb-server/usr/local/etc/openvswitch/CONF. DB -- remote = punix:/usr/local/var/run/openvswitch/DB. sock

-- Remote = DB: open_vswitch, manager_options -- private-Key = DB: SSL, private_key -- certificate = DB: SSL, certificate -- Bootstrap-ca-Cert = DB: SSL, ca_cert -- pidfile -- detach -- log-File

 

# Start ovs

Screen-s stack-x screen-T ovs

Screen-s stack-P ovs-x exec ovs-vswitchd -- pidfile -- detach

 

 

Check the running status of ovs

[Email protected]:/# ovs-vsctl show

E6ab282a-ff87-449f-b234-cc56b6e57bd9

 

[Email protected]:/# ovs-vsctl -- version

Ovs-vsctl (openvswitch) 1.10.0

Compiled Aug 9 201318: 22: 24

 

[Email protected]:/# ps-ea | grep ovs

1713? 00:00:00 ovs_workq

1715? 00:00:00 ovsdb-Server

1717? 00:00:00 ovs-vswitchd

1718? 00:00:00 ovs-vswitchd

 


Install open vswitch (ovs) through source code on Ubuntu 12.04)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.