4 This document describes installation from source. If you want to build an RPM,
5 see :ref:`packaging-redhat`.
7 Install required packages
8 -------------------------
14 sudo dnf install --enablerepo=PowerTools git autoconf pcre-devel \
15 automake libtool make readline-devel texinfo net-snmp-devel pkgconfig \
16 groff pkgconfig json-c-devel pam-devel bison flex python2-pytest \
17 c-ares-devel python2-devel libcap-devel \
18 elfutils-libelf-devel libunwind-devel \
21 .. include:: building-libunwind-note.rst
23 .. include:: building-libyang.rst
25 Get FRR, compile it and install it (from Git)
26 ---------------------------------------------
28 **This assumes you want to build and install FRR from source and not
31 Add frr groups and user
32 ^^^^^^^^^^^^^^^^^^^^^^^
36 sudo groupadd -g 92 frr
37 sudo groupadd -r -g 85 frrvty
38 sudo useradd -u 92 -g 92 -M -r -G frrvty -s /sbin/nologin \
39 -c "FRR FRRouting suite" -d /var/run/frr frr
41 Download Source, configure and compile it
42 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 (You may prefer different options on configure statement. These are just
49 git clone https://github.com/frrouting/frr.git frr
54 --sbindir=/usr/lib/frr \
55 --sysconfdir=/etc/frr \
56 --libdir=/usr/lib/frr \
57 --libexecdir=/usr/lib/frr \
58 --localstatedir=/var/run/frr \
59 --with-moduledir=/usr/lib/frr/modules \
60 --enable-snmp=agentx \
61 --enable-multipath=64 \
64 --enable-vty-group=frrvty \
67 --with-pkg-git-version \
68 --with-pkg-extra-version=-MyOwnFRRVersion \
69 SPHINXBUILD=/usr/bin/sphinx-build
74 Create empty FRR configuration files
75 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79 sudo mkdir /var/log/frr
81 sudo touch /etc/frr/zebra.conf
82 sudo touch /etc/frr/bgpd.conf
83 sudo touch /etc/frr/ospfd.conf
84 sudo touch /etc/frr/ospf6d.conf
85 sudo touch /etc/frr/isisd.conf
86 sudo touch /etc/frr/ripd.conf
87 sudo touch /etc/frr/ripngd.conf
88 sudo touch /etc/frr/pimd.conf
89 sudo touch /etc/frr/nhrpd.conf
90 sudo touch /etc/frr/eigrpd.conf
91 sudo touch /etc/frr/babeld.conf
92 sudo chown -R frr:frr /etc/frr/
93 sudo touch /etc/frr/vtysh.conf
94 sudo chown frr:frrvty /etc/frr/vtysh.conf
95 sudo chmod 640 /etc/frr/*.conf
97 Install daemon config file
98 ^^^^^^^^^^^^^^^^^^^^^^^^^^
102 sudo install -p -m 644 tools/etc/frr/daemons /etc/frr/
103 sudo chown frr:frr /etc/frr/daemons
105 Edit /etc/frr/daemons as needed to select the required daemons
106 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
108 Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc.
109 Enable the daemons as required by changing the value to ``yes``
111 Enable IP & IPv6 forwarding
112 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
114 Create a new file ``/etc/sysctl.d/90-routing-sysctl.conf`` with the
121 # Routing: We need to forward packets
122 net.ipv4.conf.all.forwarding=1
123 net.ipv6.conf.all.forwarding=1
125 Load the modified sysctl's on the system:
129 sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
136 sudo install -p -m 644 tools/frr.service /usr/lib/systemd/system/frr.service
138 Register the systemd files
139 ^^^^^^^^^^^^^^^^^^^^^^^^^^
143 sudo systemctl preset frr.service
145 Enable required frr at startup
146 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
150 sudo systemctl enable frr
152 Reboot or start FRR manually
153 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
157 sudo systemctl start frr