]> git.proxmox.com Git - mirror_frr.git/blob - doc/developer/building-frr-for-debian9.rst
doc: add libsnmp-dev to debian 8 & 9 build deps
[mirror_frr.git] / doc / developer / building-frr-for-debian9.rst
1 Debian 9
2 ========================================
3
4 Install required packages
5 -------------------------
6
7 Add 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 python-pip \
13 libc-ares-dev python3-dev python-pytest python3-sphinx build-essential \
14 libsnmp-dev libsystemd-dev
15
16 .. include:: building-libyang.rst
17
18 Get FRR, compile it and install it (from Git)
19 ---------------------------------------------
20
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
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
35 Download Source, configure and compile it
36 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37
38 (You may prefer different options on configure statement. These are just
39 an 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
64 Create 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
84 Enable IP & IPv6 forwarding
85 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
86
87 Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
88 other 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
101 system
102
103 Troubleshooting
104 ---------------
105
106 Shared library error
107 ^^^^^^^^^^^^^^^^^^^^
108
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 ::
113
114 ./zebra: error while loading shared libraries: libfrr.so.0: cannot open
115 shared object file: No such file or directory
116
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 ::
123
124 echo include /usr/local/lib >> /etc/ld.so.conf
125 ldconfig