]>
Commit | Line | Data |
---|---|---|
d1890d04 | 1 | Debian 9 |
dd54a26c MW |
2 | ======================================== |
3 | ||
4 | Install required packages | |
5 | ------------------------- | |
6 | ||
7 | Add packages: | |
8 | ||
d1890d04 QY |
9 | :: |
10 | ||
b0252580 | 11 | sudo apt-get install git autoconf automake libtool make \ |
45da32d7 DL |
12 | libreadline-dev texinfo libjson-c-dev pkg-config bison flex \ |
13 | libc-ares-dev python3-dev python3-pytest python3-sphinx build-essential \ | |
4d50168e | 14 | libsnmp-dev libsystemd-dev libcap-dev |
dd54a26c | 15 | |
fc5a4adc RW |
16 | .. include:: building-libyang.rst |
17 | ||
dd54a26c MW |
18 | Get FRR, compile it and install it (from Git) |
19 | --------------------------------------------- | |
20 | ||
d1890d04 QY |
21 | **This assumes you want to build and install FRR from source and not |
22 | using any packages** | |
23 | ||
24 | Add frr groups and user | |
75ca3b11 | 25 | ^^^^^^^^^^^^^^^^^^^^^^^ |
dd54a26c | 26 | |
d1890d04 | 27 | :: |
dd54a26c MW |
28 | |
29 | sudo addgroup --system --gid 92 frr | |
30 | sudo addgroup --system --gid 85 frrvty | |
38503c09 | 31 | sudo adduser --system --ingroup frr --home /var/opt/frr/ \ |
dd54a26c MW |
32 | --gecos "FRR suite" --shell /bin/false frr |
33 | sudo usermod -a -G frrvty frr | |
34 | ||
d1890d04 | 35 | Download Source, configure and compile it |
75ca3b11 | 36 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
d1890d04 | 37 | |
dd54a26c MW |
38 | (You may prefer different options on configure statement. These are just |
39 | an example.) | |
40 | ||
d1890d04 QY |
41 | :: |
42 | ||
dd54a26c MW |
43 | git clone https://github.com/frrouting/frr.git frr |
44 | cd frr | |
dd54a26c MW |
45 | ./bootstrap.sh |
46 | ./configure \ | |
47 | --enable-exampledir=/usr/share/doc/frr/examples/ \ | |
38503c09 | 48 | --localstatedir=/var/opt/frr \ |
dd54a26c MW |
49 | --sbindir=/usr/lib/frr \ |
50 | --sysconfdir=/etc/frr \ | |
dd54a26c MW |
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 \ | |
dd54a26c | 57 | --enable-fpm \ |
dd54a26c | 58 | --with-pkg-git-version \ |
76bd1499 | 59 | --with-pkg-extra-version=-MyOwnFRRVersion |
dd54a26c MW |
60 | make |
61 | make check | |
62 | sudo make install | |
63 | ||
d1890d04 | 64 | Create empty FRR configuration files |
75ca3b11 | 65 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
d1890d04 QY |
66 | |
67 | :: | |
dd54a26c MW |
68 | |
69 | sudo install -m 755 -o frr -g frr -d /var/log/frr | |
38503c09 | 70 | sudo install -m 755 -o frr -g frr -d /var/opt/frr |
dd54a26c MW |
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 | ||
d1890d04 | 84 | Enable IP & IPv6 forwarding |
75ca3b11 | 85 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
dd54a26c | 86 | |
d1890d04 | 87 | Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the |
dd54a26c MW |
88 | other settings) |
89 | ||
d1890d04 QY |
90 | :: |
91 | ||
dd54a26c MW |
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 | ||
d1890d04 QY |
100 | **Reboot** or use ``sysctl -p`` to apply the same config to the running |
101 | system | |
dd54a26c | 102 | |
d1890d04 | 103 | Troubleshooting |
6be1a07b | 104 | --------------- |
dd54a26c | 105 | |
6be1a07b | 106 | Shared library error |
75ca3b11 | 107 | ^^^^^^^^^^^^^^^^^^^^ |
dd54a26c | 108 | |
d1890d04 QY |
109 | If you try and start any of the frrouting daemons you may see the below |
110 | error due to the frrouting shared library directory not being found: | |
111 | ||
112 | :: | |
dd54a26c | 113 | |
6be1a07b QY |
114 | ./zebra: error while loading shared libraries: libfrr.so.0: cannot open |
115 | shared object file: No such file or directory | |
dd54a26c | 116 | |
d1890d04 QY |
117 | The fix is to add the following line to /etc/ld.so.conf which will |
118 | continue to reference the library directory after the system reboots. To | |
119 | load the library directory path immediately run the ldconfig command | |
120 | after adding the line to the file eg: | |
121 | ||
122 | :: | |
dd54a26c | 123 | |
6be1a07b QY |
124 | echo include /usr/local/lib >> /etc/ld.so.conf |
125 | ldconfig |