]> git.proxmox.com Git - mirror_frr.git/blame - doc/developer/building-frr-for-fedora.rst
doc: remove non-existent configure option
[mirror_frr.git] / doc / developer / building-frr-for-fedora.rst
CommitLineData
0ac848ab
QY
1Fedora 24+
2==========
278fb111 3
9251d1f5
QY
4This document describes installation from source. If you want to build an RPM,
5see :ref:`packaging-redhat`.
a63edb35 6
0ac848ab
QY
7These instructions have been tested on Fedora 24+.
8
63374e1d
QY
9Installing Dependencies
10-----------------------
278fb111 11
63374e1d 12.. code-block:: console
d1890d04 13
7d9a2e6d 14 sudo dnf install git autoconf automake libtool make \
63374e1d 15 readline-devel texinfo net-snmp-devel groff pkgconfig json-c-devel \
45da32d7 16 pam-devel python3-pytest bison flex c-ares-devel python3-devel \
ab140d61 17 python3-sphinx perl-core patch libcap-devel \
5b08f6f9 18 elfutils-libelf-devel libunwind-devel protobuf-c-devel
afb8fe93
DL
19
20.. include:: building-libunwind-note.rst
278fb111 21
fc5a4adc
RW
22.. include:: building-libyang.rst
23
63374e1d
QY
24Building & Installing FRR
25-------------------------
278fb111 26
ba8083e5 27Add FRR user and groups
75ca3b11 28^^^^^^^^^^^^^^^^^^^^^^^
d1890d04 29
63374e1d
QY
30.. code-block:: console
31
32 sudo groupadd -g 92 frr
33 sudo groupadd -r -g 85 frrvty
34 sudo useradd -u 92 -g 92 -M -r -G frrvty -s /sbin/nologin \
35 -c "FRR FRRouting suite" -d /var/run/frr frr
36
4ff6f66a
QY
37Compile
38^^^^^^^
39
40.. include:: include-compile.rst
41
ba8083e5
QY
42Install FRR configuration files
43^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
d1890d04 44
63374e1d 45.. code-block:: console
d1890d04 46
ba8083e5
QY
47 sudo install -m 775 -o frr -g frr -d /var/log/frr
48 sudo install -m 775 -o frr -g frrvty -d /etc/frr
49 sudo install -m 640 -o frr -g frrvty tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
50 sudo install -m 640 -o frr -g frr tools/etc/frr/frr.conf /etc/frr/frr.conf
51 sudo install -m 640 -o frr -g frr tools/etc/frr/daemons.conf /etc/frr/daemons.conf
52 sudo install -m 640 -o frr -g frr tools/etc/frr/daemons /etc/frr/daemons
a63edb35 53
ba8083e5
QY
54Tweak sysctls
55^^^^^^^^^^^^^
4ff6f66a 56
ba8083e5
QY
57Some sysctls need to be changed in order to enable IPv4/IPv6 forwarding and
58MPLS (if supported by your platform). If your platform does not support MPLS,
59skip the MPLS related configuration in this section.
278fb111 60
63374e1d 61Create a new file ``/etc/sysctl.d/90-routing-sysctl.conf`` with the following
ba8083e5 62content:
d1890d04 63
4ff6f66a 64::
278fb111 65
63374e1d 66 #
ba8083e5
QY
67 # Enable packet forwarding
68 #
63374e1d
QY
69 net.ipv4.conf.all.forwarding=1
70 net.ipv6.conf.all.forwarding=1
71 #
72 # Enable MPLS Label processing on all interfaces
ba8083e5
QY
73 #
74 #net.mpls.conf.eth0.input=1
75 #net.mpls.conf.eth1.input=1
76 #net.mpls.conf.eth2.input=1
77 #net.mpls.platform_labels=100000
78
79.. note::
278fb111 80
ba8083e5
QY
81 MPLS must be invidividually enabled on each interface that requires it. See
82 the example in the config block above.
83
eaf59d27 84Load the modified sysctls on the system:
a63edb35 85
63374e1d 86.. code-block:: console
d1890d04 87
63374e1d 88 sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
a63edb35 89
ba8083e5 90Create a new file ``/etc/modules-load.d/mpls.conf`` with the following content:
d1890d04 91
4ff6f66a 92::
278fb111 93
63374e1d
QY
94 # Load MPLS Kernel Modules
95 mpls-router
96 mpls-iptunnel
278fb111 97
a63edb35
MW
98And load the kernel modules on the running system:
99
63374e1d 100.. code-block:: console
d1890d04 101
63374e1d 102 sudo modprobe mpls-router mpls-iptunnel
a63edb35 103
fda56210
SW
104
105.. note::
106 Fedora ships with the ``firewalld`` service enabled. You may run into some
107 issues with the iptables rules it installs by default. If you wish to just
108 stop the service and clear `ALL` rules do these commands:
109
110 .. code-block:: console
111
112 sudo systemctl disable firewalld.service
113 sudo systemctl stop firewalld.service
114 sudo iptables -F
115
6819445c
DA
116Install frr Service
117^^^^^^^^^^^^^^^^^^^
d1890d04 118
63374e1d 119.. code-block:: console
d1890d04 120
6819445c 121 sudo install -p -m 644 tools/frr.service /usr/lib/systemd/system/frr.service
63374e1d 122 sudo systemctl enable frr
a63edb35 123
4ff6f66a
QY
124Enable daemons
125^^^^^^^^^^^^^^
126
127Open :file:`/etc/frr/daemons` with your text editor of choice. Look for the
128section with ``watchfrr_enable=...`` and ``zebra=...`` etc. Enable the daemons
129as required by changing the value to ``yes``.
130
63374e1d
QY
131Start FRR
132^^^^^^^^^
d1890d04 133
63374e1d 134.. code-block:: frr
d1890d04 135
63374e1d 136 sudo systemctl start frr