1 How to Install Open vSwitch on Red Hat Enterprise Linux
2 =======================================================
4 This document describes how to build and install Open vSwitch on a Red
5 Hat Enterprise Linux (RHEL) host. If you want to install Open vSwitch
6 on a generic Linux host, see INSTALL instead.
8 We have tested these instructions with RHEL 5.6 and RHEL 6.0.
10 Building Open vSwitch for RHEL
11 ------------------------------
13 You may build from an Open vSwitch distribution tarball or from an
14 Open vSwitch Git tree.
16 Before you begin, note the RPM source directory on your version of
17 RHEL. On RHEL 5, the default RPM source directory is
18 /usr/src/redhat/SOURCES. On RHEL 6, it is $HOME/rpmbuild/SOURCES.
20 1. Install build prerequisites:
22 yum install gcc make python-devel openssl-devel kernel-devel \
25 2. Some versions of the RHEL 6 kernel-devel package contain a broken
26 "build" symlink. If you are using such a version, you must fix
27 the problem before continuing.
29 To find out whether you are affected, run:
31 cd /lib/modules/<version>
34 where <version> is the version number of the RHEL 6 kernel. (The
35 trailing slash in the final command is important. Be sure to include
36 it.) If the "ls" command produces a directory listing, your
37 kernel-devel package is OK. If it produces a "No such file or
38 directory" error, your kernel-devel package is buggy.
40 If your kernel-devel package is buggy, then you can fix it with:
42 cd /lib/modules/<version>
44 ln -s /usr/src/kernels/<target> build
46 where <target> is the name of an existing directory under
47 /usr/src/kernels, whose name should be similar to <version> but may
48 contain some extra parts. Once you have done this, verify the fix with
49 the same procedure you used above to check for the problem.
51 3. If you are building from an Open vSwitch Git tree, then you will
52 need to first create a distribution tarball by running "./boot.sh;
53 ./configure; make dist" in the Git tree.
55 4. Copy the distribution tarball into the RPM source directory.
57 5. Unpack the distribution tarball into a temporary directory and "cd"
58 into the root of the distribution tarball.
60 6. To build Open vSwitch userspace, run:
62 rpmbuild -bb rhel/openvswitch.spec
64 This produces two RPMs: "openvswitch" and "openvswitch-debuginfo".
66 If the build fails with "configure: error: source dir
67 /lib/modules/2.6.32-279.el6.x86_64/build doesn't exist" or similar,
68 then the kernel-devel package is missing or buggy. Go back to step
69 1 or 2 and fix the problem.
71 7a. On RHEL 5, to build the Open vSwitch kernel module, copy
72 rhel/kmodtool-openvswitch-el5.sh into the RPM source directory and
75 rpmbuild -bb --target=i686-unknown-linux \
76 rhel/openvswitch-kmod-rhel5.spec
78 You might have to specify a kernel version, e.g.:
80 rpmbuild -bb -D "kversion 2.6.18-238.12.1.el5" \
81 --target=i686-unknown-linux \
82 rhel/openvswitch-kmod-rhel5.spec
84 This produces a "kmod-openvswitch" RPM for each kernel variant,
85 which is usually: "kmod-openvswitch", "kmod-openvswitch-xen", and
86 "kmod-openvswitch-PAE".
88 7b. On RHEL 6, to build the Open vSwitch kernel module, run:
90 rpmbuild -bb rhel/openvswitch-kmod-rhel6.spec
92 You might have to specify a kernel version and/or variants, e.g.:
95 -D "kversion 2.6.32-131.6.1.el6.x86_64" \
96 -D "kflavors default debug kdump" \
97 rhel/openvswitch-kmod-rhel6.spec
99 This produces an "kmod-openvswitch" RPM for each kernel variant,
100 in this example: "kmod-openvswitch", "kmod-openvswitch-debug", and
101 "kmod-openvswitch-kdump".
103 Red Hat Network Scripts Integration
104 -----------------------------------
106 Simple integration with Red Hat network scripts has been implemented.
107 Please read rhel/README.RHEL in the source tree or
108 /usr/share/doc/openvswitch/README.RHEL in the installed openvswitch
114 Please report problems to bugs@openvswitch.org.