1Debian 9 2======================================== 3 4Install required packages 5------------------------- 6 7Add packages: 8 9:: 10 11 sudo apt-get install git autoconf automake libtool make \ 12 libreadline-dev texinfo libjson-c-dev pkg-config bison flex \ 13 libc-ares-dev python3-dev python3-pytest python3-sphinx build-essential \ 14 libsnmp-dev libsystemd-dev libcap-dev 15 16.. include:: building-libyang.rst 17 18Get FRR, compile it and install it (from Git) 19--------------------------------------------- 20 21**This assumes you want to build and install FRR from source and not 22using any packages** 23 24Add frr groups and user 25^^^^^^^^^^^^^^^^^^^^^^^ 26 27:: 28 29 sudo addgroup --system --gid 92 frr 30 sudo addgroup --system --gid 85 frrvty 31 sudo adduser --system --ingroup frr --home /var/opt/frr/ \ 32 --gecos "FRR suite" --shell /bin/false frr 33 sudo usermod -a -G frrvty frr 34 35Download Source, configure and compile it 36^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 37 38(You may prefer different options on configure statement. These are just 39an example.) 40 41:: 42 43 git clone https://github.com/frrouting/frr.git frr 44 cd frr 45 ./bootstrap.sh 46 ./configure \ 47 --enable-exampledir=/usr/share/doc/frr/examples/ \ 48 --localstatedir=/var/opt/frr \ 49 --sbindir=/usr/lib/frr \ 50 --sysconfdir=/etc/frr \ 51 --enable-multipath=64 \ 52 --enable-user=frr \ 53 --enable-group=frr \ 54 --enable-vty-group=frrvty \ 55 --enable-configfile-mask=0640 \ 56 --enable-logfile-mask=0640 \ 57 --enable-fpm \ 58 --with-pkg-git-version \ 59 --with-pkg-extra-version=-MyOwnFRRVersion 60 make 61 make check 62 sudo make install 63 64Create empty FRR configuration files 65^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 66 67:: 68 69 sudo install -m 755 -o frr -g frr -d /var/log/frr 70 sudo install -m 755 -o frr -g frr -d /var/opt/frr 71 sudo install -m 775 -o frr -g frrvty -d /etc/frr 72 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf 73 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf 74 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf 75 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf 76 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf 77 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf 78 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf 79 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf 80 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf 81 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf 82 sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf 83 84Enable IP & IPv6 forwarding 85^^^^^^^^^^^^^^^^^^^^^^^^^^^ 86 87Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the 88other settings) 89 90:: 91 92 # Uncomment the next line to enable packet forwarding for IPv4 93 net.ipv4.ip_forward=1 94 95 # Uncomment the next line to enable packet forwarding for IPv6 96 # Enabling this option disables Stateless Address Autoconfiguration 97 # based on Router Advertisements for this host 98 net.ipv6.conf.all.forwarding=1 99 100**Reboot** or use ``sysctl -p`` to apply the same config to the running 101system 102 103Troubleshooting 104--------------- 105 106Shared library error 107^^^^^^^^^^^^^^^^^^^^ 108 109If you try and start any of the frrouting daemons you may see the below 110error due to the frrouting shared library directory not being found: 111 112:: 113 114 ./zebra: error while loading shared libraries: libfrr.so.0: cannot open 115 shared object file: No such file or directory 116 117The fix is to add the following line to /etc/ld.so.conf which will 118continue to reference the library directory after the system reboots. To 119load the library directory path immediately run the ldconfig command 120after adding the line to the file eg: 121 122:: 123 124 echo include /usr/local/lib >> /etc/ld.so.conf 125 ldconfig 126