]> git.proxmox.com Git - mirror_frr.git/blame - 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
CommitLineData
d1890d04 1Debian 9
dd54a26c
MW
2========================================
3
4Install required packages
5-------------------------
6
7Add packages:
8
d1890d04
QY
9::
10
b0252580
QY
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 \
c1bcb969 14 libsnmp-dev libsystemd-dev
dd54a26c 15
fc5a4adc
RW
16.. include:: building-libyang.rst
17
dd54a26c
MW
18Get 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
22using any packages**
23
24Add 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 35Download Source, configure and compile it
75ca3b11 36^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
d1890d04 37
dd54a26c
MW
38(You may prefer different options on configure statement. These are just
39an 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 64Create 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 84Enable IP & IPv6 forwarding
75ca3b11 85^^^^^^^^^^^^^^^^^^^^^^^^^^^
dd54a26c 86
d1890d04 87Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
dd54a26c
MW
88other 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
101system
dd54a26c 102
d1890d04 103Troubleshooting
6be1a07b 104---------------
dd54a26c 105
6be1a07b 106Shared library error
75ca3b11 107^^^^^^^^^^^^^^^^^^^^
dd54a26c 108
d1890d04
QY
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::
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
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::
dd54a26c 123
6be1a07b
QY
124 echo include /usr/local/lib >> /etc/ld.so.conf
125 ldconfig