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