1CentOS 8 2======== 3 4This document describes installation from source. If you want to build an RPM, 5see :ref:`packaging-redhat`. 6 7Install required packages 8------------------------- 9 10Add packages: 11 12:: 13 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 systemd-devel libcap-devel 18 19.. include:: building-libyang.rst 20 21Get FRR, compile it and install it (from Git) 22--------------------------------------------- 23 24**This assumes you want to build and install FRR from source and not 25using any packages** 26 27Add frr groups and user 28^^^^^^^^^^^^^^^^^^^^^^^ 29 30:: 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 37Download Source, configure and compile it 38^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 39 40(You may prefer different options on configure statement. These are just 41an example.) 42 43:: 44 45 git clone https://github.com/frrouting/frr.git frr 46 cd frr 47 ./bootstrap.sh 48 ./configure \ 49 --bindir=/usr/bin \ 50 --sbindir=/usr/lib/frr \ 51 --sysconfdir=/etc/frr \ 52 --libdir=/usr/lib/frr \ 53 --libexecdir=/usr/lib/frr \ 54 --localstatedir=/var/run/frr \ 55 --with-moduledir=/usr/lib/frr/modules \ 56 --enable-snmp=agentx \ 57 --enable-multipath=64 \ 58 --enable-user=frr \ 59 --enable-group=frr \ 60 --enable-vty-group=frrvty \ 61 --enable-systemd=yes \ 62 --disable-exampledir \ 63 --disable-ldpd \ 64 --enable-fpm \ 65 --with-pkg-git-version \ 66 --with-pkg-extra-version=-MyOwnFRRVersion \ 67 SPHINXBUILD=/usr/bin/sphinx-build 68 make 69 make check 70 sudo make install 71 72Create empty FRR configuration files 73^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 74 75:: 76 77 sudo mkdir /var/log/frr 78 sudo mkdir /etc/frr 79 sudo touch /etc/frr/zebra.conf 80 sudo touch /etc/frr/bgpd.conf 81 sudo touch /etc/frr/ospfd.conf 82 sudo touch /etc/frr/ospf6d.conf 83 sudo touch /etc/frr/isisd.conf 84 sudo touch /etc/frr/ripd.conf 85 sudo touch /etc/frr/ripngd.conf 86 sudo touch /etc/frr/pimd.conf 87 sudo touch /etc/frr/nhrpd.conf 88 sudo touch /etc/frr/eigrpd.conf 89 sudo touch /etc/frr/babeld.conf 90 sudo chown -R frr:frr /etc/frr/ 91 sudo touch /etc/frr/vtysh.conf 92 sudo chown frr:frrvty /etc/frr/vtysh.conf 93 sudo chmod 640 /etc/frr/*.conf 94 95Install daemon config file 96^^^^^^^^^^^^^^^^^^^^^^^^^^ 97 98:: 99 100 sudo install -p -m 644 tools/etc/frr/daemons /etc/frr/ 101 sudo chown frr:frr /etc/frr/daemons 102 103Edit /etc/frr/daemons as needed to select the required daemons 104^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 105 106Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc. 107Enable the daemons as required by changing the value to ``yes`` 108 109Enable IP & IPv6 forwarding 110^^^^^^^^^^^^^^^^^^^^^^^^^^^ 111 112Create a new file ``/etc/sysctl.d/90-routing-sysctl.conf`` with the 113following content: 114 115:: 116 117 # Sysctl for routing 118 # 119 # Routing: We need to forward packets 120 net.ipv4.conf.all.forwarding=1 121 net.ipv6.conf.all.forwarding=1 122 123Load the modified sysctl's on the system: 124 125:: 126 127 sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf 128 129Install frr Service 130^^^^^^^^^^^^^^^^^^^ 131 132:: 133 134 sudo install -p -m 644 tools/frr.service /usr/lib/systemd/system/frr.service 135 136Register the systemd files 137^^^^^^^^^^^^^^^^^^^^^^^^^^ 138 139:: 140 141 sudo systemctl preset frr.service 142 143Enable required frr at startup 144^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 145 146:: 147 148 sudo systemctl enable frr 149 150Reboot or start FRR manually 151^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 152 153:: 154 155 sudo systemctl start frr 156