]>
Commit | Line | Data |
---|---|---|
542cc9bb TG |
1 | How to Install Open vSwitch on Fedora Linux |
2 | =========================================== | |
d8fe0a6a RS |
3 | |
4 | This document describes how to build and install Open vSwitch on a Fedora | |
5 | Linux host. If you want to install Open vSwitch on a generic Linux host, | |
9feb1017 | 6 | see [INSTALL.md] instead. |
d8fe0a6a | 7 | |
aa7b733f RB |
8 | We have tested these instructions with Fedora 23. These instructions are also |
9 | used for RHEL 7.x and its derivatives, such as CentOS 7.x. | |
d8fe0a6a RS |
10 | |
11 | Building Open vSwitch for Fedora | |
12 | -------------------------------- | |
13 | ||
14 | You may build from an Open vSwitch distribution tarball or from an | |
15 | Open vSwitch Git tree. | |
16 | ||
1547f8e3 FL |
17 | The default RPM build directory (_topdir) has five directories in |
18 | the top-level: | |
19 | 1. BUILD/ Where the software is unpacked and built. | |
20 | 2. RPMS/ Where the newly created binary package files are written. | |
21 | 3. SOURCES/ Contains the original sources, patches, and icon files. | |
22 | 4. SPECS/ Contains the spec files for each package to be built. | |
23 | 5. SRPMS/ Where the newly created source package files are written. | |
24 | ||
25 | Before you begin, note the RPM sources directory on your version of | |
26 | Fedora. The command "rpmbuild --showrc" will show the configuration | |
27 | for each of those directories. Alternatively, the command "rpm --eval | |
28 | '%{_topdir}'" shows the current configuration for the top level | |
29 | directory and the command "rpm --eval '%{_sourcedir}'" does the same | |
aa7b733f | 30 | for the sources directory. On Fedora 23, the default RPM _topdir is |
1547f8e3 FL |
31 | $HOME/rpmbuild and the default RPM sources directory is |
32 | $HOME/rpmbuild/SOURCES. | |
d8fe0a6a | 33 | |
935cdc95 BP |
34 | 1. If you are building from a distribution tarball, skip to step 2. |
35 | Otherwise, you must be building from an Open vSwitch Git tree. | |
36 | Create a distribution tarball from the root of the Git tree by | |
37 | running: | |
d8fe0a6a | 38 | |
542cc9bb | 39 | ``` |
935cdc95 BP |
40 | ./boot.sh |
41 | ./configure | |
42 | make dist | |
542cc9bb | 43 | ``` |
d8fe0a6a | 44 | |
935cdc95 BP |
45 | 2. Now you have a distribution tarball, named something like |
46 | openvswitch-x.y.z.tar.gz. Copy this file into the RPM sources | |
47 | directory, e.g.: | |
48 | ||
542cc9bb | 49 | `cp openvswitch-x.y.z.tar.gz $HOME/rpmbuild/SOURCES` |
935cdc95 BP |
50 | |
51 | 3. Make another copy of the distribution tarball in a temporary | |
52 | directory. Then unpack the tarball and "cd" into its root, e.g.: | |
53 | ||
542cc9bb | 54 | ``` |
935cdc95 BP |
55 | tar xzf openvswitch-x.y.z.tar.gz |
56 | cd openvswitch-x.y.z | |
542cc9bb | 57 | ``` |
d8fe0a6a RS |
58 | |
59 | 4. To build Open vSwitch userspace, run: | |
60 | ||
542cc9bb | 61 | `rpmbuild -bb rhel/openvswitch-fedora.spec` |
d8fe0a6a RS |
62 | |
63 | This produces one RPM: "openvswitch". | |
64 | ||
eea0cdb5 PM |
65 | To enable DPDK support in the resulting openvswitch package, |
66 | add `--with dpdk` to the build command. | |
67 | ||
329cf232 GS |
68 | The above command automatically runs the Open vSwitch unit tests. |
69 | To disable the unit tests, run: | |
70 | ||
542cc9bb | 71 | `rpmbuild -bb --without check rhel/openvswitch-fedora.spec` |
329cf232 | 72 | |
aa7b733f | 73 | 5. On Fedora 23, to build the Open vSwitch kernel module, run: |
d8fe0a6a | 74 | |
542cc9bb | 75 | `rpmbuild -bb rhel/openvswitch-kmod-fedora.spec` |
d8fe0a6a RS |
76 | |
77 | You might have to specify a kernel version and/or variants, e.g.: | |
78 | ||
542cc9bb | 79 | ``` |
d8fe0a6a | 80 | rpmbuild -bb \ |
aa7b733f | 81 | -D "kversion 4.3.3-300.fc23.x86_64” \ |
d8fe0a6a | 82 | -D "kflavors default debug kdump" \ |
aa7b733f | 83 | rhel/openvswitch-kmod-fedora.spec |
542cc9bb | 84 | ``` |
d8fe0a6a RS |
85 | |
86 | This produces an "kmod-openvswitch" RPM for each kernel variant, | |
87 | in this example: "kmod-openvswitch", "kmod-openvswitch-debug", and | |
88 | "kmod-openvswitch-kdump". | |
89 | ||
90 | Reporting Bugs | |
91 | -------------- | |
92 | ||
93 | Please report problems to bugs@openvswitch.org. | |
9feb1017 TG |
94 | |
95 | [INSTALL.md]:INSTALL.md |