]>
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. | |
daa867f6 | 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 | |
a82083ee | 72 | or for RHEL 8:: |
2eebece5 | 73 | |
a82083ee GR |
74 | $ subscription-manager repos \ |
75 | --enable=codeready-builder-for-rhel-8-x86_64-rpms | |
76 | ||
936cca17 BP |
77 | DNF:: |
78 | ||
6806b962 FL |
79 | $ dnf builddep /tmp/ovs.spec |
80 | ||
936cca17 BP |
81 | YUM:: |
82 | ||
6806b962 FL |
83 | $ yum-builddep /tmp/ovs.spec |
84 | ||
85 | Once that is completed, remove the file ``/tmp/ovs.spec``. | |
45742db4 SF |
86 | |
87 | Bootstraping | |
88 | ------------ | |
89 | ||
795752a3 | 90 | Refer to :ref:`general-bootstrapping`. |
45742db4 SF |
91 | |
92 | Configuring | |
93 | ----------- | |
94 | ||
795752a3 | 95 | Refer to :ref:`general-configuring`. |
45742db4 SF |
96 | |
97 | Building | |
98 | -------- | |
99 | ||
100 | User Space RPMs | |
101 | ~~~~~~~~~~~~~~~ | |
102 | ||
103 | To build Open vSwitch user-space RPMs, execute the following from the directory | |
104 | in which `./configure` was executed: | |
105 | ||
106 | :: | |
107 | ||
108 | $ make rpm-fedora | |
109 | ||
1ca0323e | 110 | This will create the RPMs `openvswitch`, `python3-openvswitch`, |
78203a9c | 111 | `openvswitch-test`, `openvswitch-devel` and `openvswitch-debuginfo`. |
45742db4 SF |
112 | |
113 | To enable DPDK support in the openvswitch package, the ``--with dpdk`` option | |
114 | can be added: | |
115 | ||
116 | :: | |
117 | ||
fb876c94 | 118 | $ make rpm-fedora RPMBUILD_OPT="--with dpdk --without check" |
45742db4 | 119 | |
9acbdd65 YHW |
120 | To enable AF_XDP support in the openvswitch package, the ``--with afxdp`` |
121 | option can be added: | |
122 | ||
123 | :: | |
124 | ||
125 | $ make rpm-fedora RPMBUILD_OPT="--with afxdp --without check" | |
126 | ||
fb876c94 RB |
127 | You can also have the above commands automatically run the Open vSwitch unit |
128 | tests. This can take several minutes. | |
45742db4 SF |
129 | |
130 | :: | |
131 | ||
fb876c94 | 132 | $ make rpm-fedora RPMBUILD_OPT="--with check" |
45742db4 | 133 | |
78203a9c | 134 | |
45742db4 SF |
135 | Kernel OVS Tree Datapath RPM |
136 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
137 | ||
138 | To build the Open vSwitch kernel module for the currently running kernel | |
139 | version, run: | |
140 | ||
141 | :: | |
142 | ||
143 | $ make rpm-fedora-kmod | |
144 | ||
145 | To build the Open vSwitch kernel module for another kernel version, the desired | |
146 | kernel version can be specified via the `kversion` macro. For example: | |
147 | ||
148 | :: | |
149 | ||
150 | $ make rpm-fedora-kmod \ | |
151 | RPMBUILD_OPT='-D "kversion 4.3.4-300.fc23.x86_64"' | |
152 | ||
153 | Installing | |
154 | ---------- | |
155 | ||
156 | RPM packages can be installed by using the command ``rpm -i``. Package | |
157 | installation requires superuser privileges. | |
158 | ||
159 | The `openvswitch-kmod` RPM should be installed first if the Linux OVS tree | |
160 | datapath module is to be used. The `openvswitch-kmod` RPM should not be | |
161 | installed if only the in-tree Linux datapath or user-space datapath is needed. | |
11e02906 | 162 | Refer to the :doc:`/faq/index` for more information about the various Open |
45742db4 SF |
163 | vSwitch datapath options. |
164 | ||
165 | In most cases only the `openvswitch` RPM will need to be installed. The | |
1ca0323e | 166 | `python3-openvswitch`, `openvswitch-test`, `openvswitch-devel`, and |
45742db4 SF |
167 | `openvswitch-debuginfo` RPMs are optional unless required for a specific |
168 | purpose. | |
169 | ||
5813d810 SF |
170 | Refer to the `RHEL README`__ for additional usage and configuration |
171 | information. | |
172 | ||
173 | __ https://github.com/openvswitch/ovs/blob/master/rhel/README.RHEL.rst | |
45742db4 SF |
174 | |
175 | Reporting Bugs | |
176 | -------------- | |
177 | ||
178 | Report problems to bugs@openvswitch.org. |