]> git.proxmox.com Git - mirror_frr.git/blame - doc/developer/building-frr-for-fedora24.rst
doc: update Fedora 24 build doc
[mirror_frr.git] / doc / developer / building-frr-for-fedora24.rst
CommitLineData
d1890d04 1Fedora 24
63374e1d 2=========
278fb111 3
9251d1f5
QY
4This document describes installation from source. If you want to build an RPM,
5see :ref:`packaging-redhat`.
a63edb35 6
63374e1d
QY
7Installing Dependencies
8-----------------------
278fb111 9
63374e1d 10.. code-block:: console
d1890d04 11
63374e1d
QY
12 sudo dnf install git autoconf automake libtool make gawk \
13 readline-devel texinfo net-snmp-devel groff pkgconfig json-c-devel \
ba8083e5
QY
14 pam-devel pytest bison flex c-ares-devel python3-devel python2-sphinx \
15 perl-core patch
278fb111 16
fc5a4adc
RW
17.. include:: building-libyang.rst
18
63374e1d
QY
19Building & Installing FRR
20-------------------------
278fb111 21
ba8083e5
QY
22Compile
23^^^^^^^
63374e1d
QY
24
25Clone the FRR git repo and use the included ``configure`` script to configure
26FRR's build time options to your liking. The full option listing can be
27obtained by running ``./configure -h``. The options shown below are examples.
28
29.. code-block:: console
30
31 git clone https://github.com/frrouting/frr.git frr
32 cd frr
33 ./bootstrap.sh
34 ./configure \
35 --bindir=/usr/bin \
36 --sbindir=/usr/lib/frr \
37 --sysconfdir=/etc/frr \
38 --libdir=/usr/lib/frr \
39 --libexecdir=/usr/lib/frr \
40 --localstatedir=/var/run/frr \
41 --with-moduledir=/usr/lib/frr/modules \
ba8083e5 42 --with-libyang-pluginsdir=/usr/lib/frr/libyang_plugins \
63374e1d
QY
43 --enable-snmp=agentx \
44 --enable-multipath=64 \
45 --enable-user=frr \
46 --enable-group=frr \
47 --enable-vty-group=frrvty \
48 --disable-exampledir \
49 --enable-fpm \
50 --with-pkg-git-version \
51 --with-pkg-extra-version=-MyOwnFRRVersion
52 make
53 sudo make install
54
ba8083e5 55Add FRR user and groups
75ca3b11 56^^^^^^^^^^^^^^^^^^^^^^^
d1890d04 57
63374e1d
QY
58.. code-block:: console
59
60 sudo groupadd -g 92 frr
61 sudo groupadd -r -g 85 frrvty
62 sudo useradd -u 92 -g 92 -M -r -G frrvty -s /sbin/nologin \
63 -c "FRR FRRouting suite" -d /var/run/frr frr
64
ba8083e5
QY
65Install FRR configuration files
66^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
d1890d04 67
63374e1d 68.. code-block:: console
d1890d04 69
ba8083e5
QY
70 sudo install -m 775 -o frr -g frr -d /var/log/frr
71 sudo install -m 775 -o frr -g frrvty -d /etc/frr
72 sudo install -m 640 -o frr -g frrvty tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
73 sudo install -m 640 -o frr -g frr tools/etc/frr/frr.conf /etc/frr/frr.conf
74 sudo install -m 640 -o frr -g frr tools/etc/frr/daemons.conf /etc/frr/daemons.conf
75 sudo install -m 640 -o frr -g frr tools/etc/frr/daemons /etc/frr/daemons
a63edb35 76
ba8083e5
QY
77Enable daemons
78^^^^^^^^^^^^^^
a63edb35 79
ba8083e5
QY
80Open :file:`/etc/frr/daemons` with your text editor of choice. Look for the
81section with ``watchfrr_enable=...`` and ``zebra=...`` etc. Enable the daemons
82as required by changing the value to ``yes``.
a63edb35 83
ba8083e5
QY
84Tweak sysctls
85^^^^^^^^^^^^^
86Some sysctls need to be changed in order to enable IPv4/IPv6 forwarding and
87MPLS (if supported by your platform). If your platform does not support MPLS,
88skip the MPLS related configuration in this section.
278fb111 89
63374e1d 90Create a new file ``/etc/sysctl.d/90-routing-sysctl.conf`` with the following
ba8083e5 91content:
d1890d04 92
63374e1d 93.. code-block:: console
278fb111 94
63374e1d 95 #
ba8083e5
QY
96 # Enable packet forwarding
97 #
63374e1d
QY
98 net.ipv4.conf.all.forwarding=1
99 net.ipv6.conf.all.forwarding=1
100 #
101 # Enable MPLS Label processing on all interfaces
ba8083e5
QY
102 #
103 #net.mpls.conf.eth0.input=1
104 #net.mpls.conf.eth1.input=1
105 #net.mpls.conf.eth2.input=1
106 #net.mpls.platform_labels=100000
107
108.. note::
278fb111 109
ba8083e5
QY
110 MPLS must be invidividually enabled on each interface that requires it. See
111 the example in the config block above.
112
113Load the modifed sysctls on the system:
a63edb35 114
63374e1d 115.. code-block:: console
d1890d04 116
63374e1d 117 sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
a63edb35 118
ba8083e5 119Create a new file ``/etc/modules-load.d/mpls.conf`` with the following content:
d1890d04 120
63374e1d 121.. code-block:: console
278fb111 122
63374e1d
QY
123 # Load MPLS Kernel Modules
124 mpls-router
125 mpls-iptunnel
278fb111 126
a63edb35
MW
127And load the kernel modules on the running system:
128
63374e1d 129.. code-block:: console
d1890d04 130
63374e1d 131 sudo modprobe mpls-router mpls-iptunnel
a63edb35 132
ba8083e5
QY
133Install service files
134^^^^^^^^^^^^^^^^^^^^^
d1890d04 135
63374e1d 136.. code-block:: console
d1890d04 137
63374e1d
QY
138 sudo install -p -m 644 redhat/frr.service /usr/lib/systemd/system/frr.service
139 sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr
140 sudo systemctl enable frr
a63edb35 141
63374e1d
QY
142Start FRR
143^^^^^^^^^
d1890d04 144
63374e1d 145.. code-block:: frr
d1890d04 146
63374e1d 147 sudo systemctl start frr