]> git.proxmox.com Git - mirror_frr.git/blob - doc/developer/building-frr-for-debian9.rst
Merge pull request #13546 from LabNConsulting/chopps/pylint-fix
[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 \
13 libc-ares-dev python3-dev python3-pytest python3-sphinx build-essential \
14 libsnmp-dev libcap-dev libelf-dev libunwind-dev \
15 libprotobuf-c-dev protobuf-c-compiler
16
17 .. include:: building-libunwind-note.rst
18
19 .. include:: building-libyang.rst
20
21 Get FRR, compile it and install it (from Git)
22 ---------------------------------------------
23
24 **This assumes you want to build and install FRR from source and not
25 using any packages**
26
27 Add frr groups and user
28 ^^^^^^^^^^^^^^^^^^^^^^^
29
30 ::
31
32 sudo addgroup --system --gid 92 frr
33 sudo addgroup --system --gid 85 frrvty
34 sudo adduser --system --ingroup frr --home /var/opt/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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40
41 (You may prefer different options on configure statement. These are just
42 an example.)
43
44 ::
45
46 git clone https://github.com/frrouting/frr.git frr
47 cd frr
48 ./bootstrap.sh
49 ./configure \
50 --localstatedir=/var/opt/frr \
51 --sbindir=/usr/lib/frr \
52 --sysconfdir=/etc/frr \
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 \
59 --enable-fpm \
60 --with-pkg-git-version \
61 --with-pkg-extra-version=-MyOwnFRRVersion
62 make
63 make check
64 sudo make install
65
66 Create empty FRR configuration files
67 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68
69 ::
70
71 sudo install -m 755 -o frr -g frr -d /var/log/frr
72 sudo install -m 755 -o frr -g frr -d /var/opt/frr
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
86 Enable IP & IPv6 forwarding
87 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
88
89 Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
90 other settings)
91
92 ::
93
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
102 **Reboot** or use ``sysctl -p`` to apply the same config to the running
103 system
104
105 Troubleshooting
106 ---------------
107
108 Shared library error
109 ^^^^^^^^^^^^^^^^^^^^
110
111 If you try and start any of the frrouting daemons you may see the below
112 error due to the frrouting shared library directory not being found:
113
114 ::
115
116 ./zebra: error while loading shared libraries: libfrr.so.0: cannot open
117 shared object file: No such file or directory
118
119 The fix is to add the following line to /etc/ld.so.conf which will
120 continue to reference the library directory after the system reboots. To
121 load the library directory path immediately run the ldconfig command
122 after adding the line to the file eg:
123
124 ::
125
126 echo include /usr/local/lib >> /etc/ld.so.conf
127 ldconfig