]> git.proxmox.com Git - mirror_ovs.git/blame - Documentation/intro/install/fedora.rst
sandbox: Fix env for clustered OVN DBs.
[mirror_ovs.git] / Documentation / intro / install / fedora.rst
CommitLineData
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===========================================
25Fedora, RHEL 7.x Packaging for Open vSwitch
26===========================================
45742db4
SF
27
28This document provides instructions for building and installing Open vSwitch
29RPM packages on a Fedora Linux host. Instructions for the installation of Open
30vSwitch on a Fedora Linux host without using RPM packages can be found in the
795752a3 31:doc:`general`.
45742db4
SF
32
33These instructions have been tested with Fedora 23, and are also applicable for
34RHEL 7.x and its derivatives, including CentOS 7.x and Scientific Linux 7.x.
35
36Build Requirements
37------------------
38
6806b962
FL
39You will need to install all required packages to build the RPMs.
40Newer distributions use ``dnf`` but if it's not available, then use
41``yum`` instructions.
42
43The command below will install RPM tools and generic build dependencies.
44And (optionally) include these packages: libcap-ng libcap-ng-devel dpdk-devel.
45
46DNF:
47::
48
49 $ dnf install @'Development Tools' rpm-build dnf-plugins-core
50
51YUM:
52::
53
54 $ yum install @'Development Tools' rpm-build yum-utils
55
56Then it is necessary to install Open vSwitch specific build dependencies.
57The dependencies are listed in the SPEC file, but first it is necessary
58to replace the VERSION tag to be a valid SPEC.
59
936cca17
BP
60The 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
65And to install specific dependencies, use the corresponding tool below.
e3882e4d 66For some of the dependencies on RHEL you may need to add two additional
cf372495 67repositories 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
72DNF::
73
6806b962
FL
74 $ dnf builddep /tmp/ovs.spec
75
936cca17
BP
76YUM::
77
6806b962
FL
78 $ yum-builddep /tmp/ovs.spec
79
80Once that is completed, remove the file ``/tmp/ovs.spec``.
45742db4
SF
81
82Bootstraping
83------------
84
795752a3 85Refer to :ref:`general-bootstrapping`.
45742db4
SF
86
87Configuring
88-----------
89
795752a3 90Refer to :ref:`general-configuring`.
45742db4
SF
91
92Building
93--------
94
95User Space RPMs
96~~~~~~~~~~~~~~~
97
98To build Open vSwitch user-space RPMs, execute the following from the directory
99in which `./configure` was executed:
100
101::
102
103 $ make rpm-fedora
104
105This 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
110To enable DPDK support in the openvswitch package, the ``--with dpdk`` option
111can be added:
112
113::
114
fb876c94 115 $ make rpm-fedora RPMBUILD_OPT="--with dpdk --without check"
45742db4 116
fb876c94
RB
117You can also have the above commands automatically run the Open vSwitch unit
118tests. This can take several minutes.
45742db4
SF
119
120::
121
fb876c94 122 $ make rpm-fedora RPMBUILD_OPT="--with check"
45742db4
SF
123
124Kernel OVS Tree Datapath RPM
125~~~~~~~~~~~~~~~~~~~~~~~~~~~~
126
127To build the Open vSwitch kernel module for the currently running kernel
128version, run:
129
130::
131
132 $ make rpm-fedora-kmod
133
134To build the Open vSwitch kernel module for another kernel version, the desired
135kernel 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
142Installing
143----------
144
145RPM packages can be installed by using the command ``rpm -i``. Package
146installation requires superuser privileges.
147
148The `openvswitch-kmod` RPM should be installed first if the Linux OVS tree
149datapath module is to be used. The `openvswitch-kmod` RPM should not be
150installed if only the in-tree Linux datapath or user-space datapath is needed.
11e02906 151Refer to the :doc:`/faq/index` for more information about the various Open
45742db4
SF
152vSwitch datapath options.
153
154In 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
157purpose.
158
159The `openvswitch-ovn-*` packages are only needed when using OVN.
160
5813d810
SF
161Refer to the `RHEL README`__ for additional usage and configuration
162information.
163
164__ https://github.com/openvswitch/ovs/blob/master/rhel/README.RHEL.rst
45742db4
SF
165
166Reporting Bugs
167--------------
168
169Report problems to bugs@openvswitch.org.