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)