]>
Commit | Line | Data |
---|---|---|
45742db4 SF |
1 | .. |
2 | Licensed under the Apache License, Version 2.0 (the "License"); you may | |
3 | not use this file except in compliance with the License. You may obtain | |
4 | a copy of the License at | |
5 | ||
6 | http://www.apache.org/licenses/LICENSE-2.0 | |
7 | ||
8 | Unless required by applicable law or agreed to in writing, software | |
9 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |
10 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |
11 | License for the specific language governing permissions and limitations | |
12 | under the License. | |
13 | ||
14 | Convention for heading levels in Open vSwitch documentation: | |
15 | ||
16 | ======= Heading 0 (reserved for the title in a document) | |
17 | ------- Heading 1 | |
18 | ~~~~~~~ Heading 2 | |
19 | +++++++ Heading 3 | |
20 | ''''''' Heading 4 | |
21 | ||
22 | Avoid deeper levels because they do not render well. | |
23 | ||
795752a3 SF |
24 | =========================================== |
25 | Fedora, RHEL 7.x Packaging for Open vSwitch | |
26 | =========================================== | |
45742db4 SF |
27 | |
28 | This document provides instructions for building and installing Open vSwitch | |
29 | RPM packages on a Fedora Linux host. Instructions for the installation of Open | |
30 | vSwitch on a Fedora Linux host without using RPM packages can be found in the | |
795752a3 | 31 | :doc:`general`. |
45742db4 SF |
32 | |
33 | These instructions have been tested with Fedora 23, and are also applicable for | |
34 | RHEL 7.x and its derivatives, including CentOS 7.x and Scientific Linux 7.x. | |
35 | ||
36 | Build Requirements | |
37 | ------------------ | |
38 | ||
6806b962 FL |
39 | You will need to install all required packages to build the RPMs. |
40 | Newer distributions use ``dnf`` but if it's not available, then use | |
41 | ``yum`` instructions. | |
42 | ||
43 | The command below will install RPM tools and generic build dependencies. | |
44 | And (optionally) include these packages: libcap-ng libcap-ng-devel dpdk-devel. | |
45 | ||
46 | DNF: | |
47 | :: | |
48 | ||
49 | $ dnf install @'Development Tools' rpm-build dnf-plugins-core | |
50 | ||
51 | YUM: | |
52 | :: | |
53 | ||
54 | $ yum install @'Development Tools' rpm-build yum-utils | |
55 | ||
56 | Then it is necessary to install Open vSwitch specific build dependencies. | |
57 | The dependencies are listed in the SPEC file, but first it is necessary | |
58 | to replace the VERSION tag to be a valid SPEC. | |
59 | ||
936cca17 BP |
60 | The command below will create a temporary SPEC file:: |
61 | ||
6806b962 FL |
62 | $ sed -e 's/@VERSION@/0.0.1/' rhel/openvswitch-fedora.spec.in \ |
63 | > /tmp/ovs.spec | |
64 | ||
65 | And to install specific dependencies, use the corresponding tool below. | |
e3882e4d | 66 | For some of the dependencies on RHEL you may need to add two additional |
cf372495 | 67 | repositories to help yum-builddep, e.g.:: |
e3882e4d | 68 | |
cf372495 YHW |
69 | $ subscription-manager repos --enable=rhel-7-server-extras-rpms |
70 | $ subscription-manager repos --enable=rhel-7-server-optional-rpms | |
6806b962 | 71 | |
936cca17 BP |
72 | DNF:: |
73 | ||
6806b962 FL |
74 | $ dnf builddep /tmp/ovs.spec |
75 | ||
936cca17 BP |
76 | YUM:: |
77 | ||
6806b962 FL |
78 | $ yum-builddep /tmp/ovs.spec |
79 | ||
80 | Once that is completed, remove the file ``/tmp/ovs.spec``. | |
45742db4 SF |
81 | |
82 | Bootstraping | |
83 | ------------ | |
84 | ||
795752a3 | 85 | Refer to :ref:`general-bootstrapping`. |
45742db4 SF |
86 | |
87 | Configuring | |
88 | ----------- | |
89 | ||
795752a3 | 90 | Refer to :ref:`general-configuring`. |
45742db4 SF |
91 | |
92 | Building | |
93 | -------- | |
94 | ||
95 | User Space RPMs | |
96 | ~~~~~~~~~~~~~~~ | |
97 | ||
98 | To build Open vSwitch user-space RPMs, execute the following from the directory | |
99 | in which `./configure` was executed: | |
100 | ||
101 | :: | |
102 | ||
103 | $ make rpm-fedora | |
104 | ||
105 | This will create the RPMs `openvswitch`, `python-openvswitch`, | |
106 | `openvswitch-test`, `openvswitch-devel`, `openvswitch-ovn-common`, | |
107 | `openvswitch-ovn-central`, `openvswitch-ovn-host`, `openvswitch-ovn-vtep`, | |
108 | `openvswitch-ovn-docker`, and `openvswitch-debuginfo`. | |
109 | ||
110 | To enable DPDK support in the openvswitch package, the ``--with dpdk`` option | |
111 | can be added: | |
112 | ||
113 | :: | |
114 | ||
fb876c94 | 115 | $ make rpm-fedora RPMBUILD_OPT="--with dpdk --without check" |
45742db4 | 116 | |
fb876c94 RB |
117 | You can also have the above commands automatically run the Open vSwitch unit |
118 | tests. This can take several minutes. | |
45742db4 SF |
119 | |
120 | :: | |
121 | ||
fb876c94 | 122 | $ make rpm-fedora RPMBUILD_OPT="--with check" |
45742db4 SF |
123 | |
124 | Kernel OVS Tree Datapath RPM | |
125 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
126 | ||
127 | To build the Open vSwitch kernel module for the currently running kernel | |
128 | version, run: | |
129 | ||
130 | :: | |
131 | ||
132 | $ make rpm-fedora-kmod | |
133 | ||
134 | To build the Open vSwitch kernel module for another kernel version, the desired | |
135 | kernel version can be specified via the `kversion` macro. For example: | |
136 | ||
137 | :: | |
138 | ||
139 | $ make rpm-fedora-kmod \ | |
140 | RPMBUILD_OPT='-D "kversion 4.3.4-300.fc23.x86_64"' | |
141 | ||
142 | Installing | |
143 | ---------- | |
144 | ||
145 | RPM packages can be installed by using the command ``rpm -i``. Package | |
146 | installation requires superuser privileges. | |
147 | ||
148 | The `openvswitch-kmod` RPM should be installed first if the Linux OVS tree | |
149 | datapath module is to be used. The `openvswitch-kmod` RPM should not be | |
150 | installed if only the in-tree Linux datapath or user-space datapath is needed. | |
11e02906 | 151 | Refer to the :doc:`/faq/index` for more information about the various Open |
45742db4 SF |
152 | vSwitch datapath options. |
153 | ||
154 | In most cases only the `openvswitch` RPM will need to be installed. The | |
155 | `python-openvswitch`, `openvswitch-test`, `openvswitch-devel`, and | |
156 | `openvswitch-debuginfo` RPMs are optional unless required for a specific | |
157 | purpose. | |
158 | ||
159 | The `openvswitch-ovn-*` packages are only needed when using OVN. | |
160 | ||
5813d810 SF |
161 | Refer to the `RHEL README`__ for additional usage and configuration |
162 | information. | |
163 | ||
164 | __ https://github.com/openvswitch/ovs/blob/master/rhel/README.RHEL.rst | |
45742db4 SF |
165 | |
166 | Reporting Bugs | |
167 | -------------- | |
168 | ||
169 | Report problems to bugs@openvswitch.org. |