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