]> git.proxmox.com Git - mirror_frr.git/blob - doc/Building_FRR_on_Debian8.md
*: remove --enable-tcp-zebra, rework ZAPI path
[mirror_frr.git] / doc / Building_FRR_on_Debian8.md
1 Building FRR on Debian 8 from Git Source
2 ========================================
3
4 Debian 8 restrictions:
5 ----------------------
6
7 - MPLS is not supported on `Debian 8` with default kernel. MPLS requires
8 Linux Kernel 4.5 or higher (LDP can be built, but may have limited use
9 without MPLS)
10
11 Install required packages
12 -------------------------
13
14 Add packages:
15
16 sudo apt-get install git autoconf automake libtool make gawk \
17 libreadline-dev texinfo libjson-c-dev pkg-config bison flex \
18 python-pip libc-ares-dev python3-dev
19
20 Install newer pytest (>3.0) from pip
21
22 sudo pip install pytest
23
24 Get FRR, compile it and install it (from Git)
25 ---------------------------------------------
26
27 **This assumes you want to build and install FRR from source and not using
28 any packages**
29
30 ### Add frr groups and user
31
32 sudo addgroup --system --gid 92 frr
33 sudo addgroup --system --gid 85 frrvty
34 sudo adduser --system --ingroup frr --home /var/run/frr/ \
35 --gecos "FRR suite" --shell /bin/false frr
36 sudo usermod -a -G frrvty frr
37
38 ### Download Source, configure and compile it
39 (You may prefer different options on configure statement. These are just
40 an example.)
41
42 git clone https://github.com/frrouting/frr.git frr
43 cd frr
44 ./bootstrap.sh
45 ./configure \
46 --enable-exampledir=/usr/share/doc/frr/examples/ \
47 --localstatedir=/var/run/frr \
48 --sbindir=/usr/lib/frr \
49 --sysconfdir=/etc/frr \
50 --enable-vtysh \
51 --enable-isisd \
52 --enable-pimd \
53 --enable-watchfrr \
54 --enable-ospfclient=yes \
55 --enable-ospfapi=yes \
56 --enable-multipath=64 \
57 --enable-user=frr \
58 --enable-group=frr \
59 --enable-vty-group=frrvty \
60 --enable-configfile-mask=0640 \
61 --enable-logfile-mask=0640 \
62 --enable-rtadv \
63 --enable-fpm \
64 --enable-ldpd \
65 --with-pkg-git-version \
66 --with-pkg-extra-version=-MyOwnFRRVersion
67 make
68 make check
69 sudo make install
70
71 ### Create empty FRR configuration files
72
73 sudo install -m 755 -o frr -g frr -d /var/log/frr
74 sudo install -m 775 -o frr -g frrvty -d /etc/frr
75 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf
76 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf
77 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf
78 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf
79 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf
80 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf
81 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf
82 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf
83 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf
84 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf
85 sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
86
87 ### Enable IP & IPv6 forwarding
88
89 Edit `/etc/sysctl.conf` and uncomment the following values (ignore the
90 other settings)
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 system
101
102 ### Troubleshooting
103
104 **Local state directory**
105
106 The local state directory must exist and have the correct permissions applied
107 for the frrouting daemons to start. In the above ./configure example the
108 local state directory is set to /var/run/frr (--localstatedir=/var/run/frr)
109 Debian considers /var/run/frr to be temporary and this is removed after a
110 reboot.
111
112 When using a different local state directory you need to create the new
113 directory and change the ownership to the frr user, for example:
114
115 mkdir /var/opt/frr
116 chown frr /var/opt/frr
117
118 **Shared library error**
119
120 If you try and start any of the frrouting daemons you may see the below error
121 due to the frrouting shared library directory not being found:
122
123 ./zebra: error while loading shared libraries: libfrr.so.0: cannot open shared object file: No such file or directory
124
125 The fix is to add the following line to /etc/ld.so.conf which will continue to
126 reference the library directory after the system reboots. To load the library
127 directory path immediately run the ldconfig command after adding the line to
128 the file eg:
129
130 echo include /usr/local/lib >> /etc/ld.so.conf
131 ldconfig