]> git.proxmox.com Git - mirror_frr.git/blob - doc/developer/building-frr-for-debian9.rst
Merge pull request #2909 from netravnen/feature/git-pl-template
[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 python-pip libc-ares-dev python3-dev python-pytest python3-sphinx
14
15 Get FRR, compile it and install it (from Git)
16 ---------------------------------------------
17
18 **This assumes you want to build and install FRR from source and not
19 using any packages**
20
21 Add frr groups and user
22 ^^^^^^^^^^^^^^^^^^^^^^^
23
24 ::
25
26 sudo addgroup --system --gid 92 frr
27 sudo addgroup --system --gid 85 frrvty
28 sudo adduser --system --ingroup frr --home /var/opt/frr/ \
29 --gecos "FRR suite" --shell /bin/false frr
30 sudo usermod -a -G frrvty frr
31
32 Download Source, configure and compile it
33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34
35 (You may prefer different options on configure statement. These are just
36 an example.)
37
38 ::
39
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/ \
46 --localstatedir=/var/opt/frr \
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 \
65 --with-pkg-extra-version=-MyOwnFRRVersion
66 make
67 make check
68 sudo make install
69
70 Create empty FRR configuration files
71 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72
73 ::
74
75 sudo install -m 755 -o frr -g frr -d /var/log/frr
76 sudo install -m 755 -o frr -g frr -d /var/opt/frr
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
90 Enable IP & IPv6 forwarding
91 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
92
93 Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
94 other settings)
95
96 ::
97
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
106 **Reboot** or use ``sysctl -p`` to apply the same config to the running
107 system
108
109 Troubleshooting
110 ---------------
111
112 Shared library error
113 ^^^^^^^^^^^^^^^^^^^^
114
115 If you try and start any of the frrouting daemons you may see the below
116 error due to the frrouting shared library directory not being found:
117
118 ::
119
120 ./zebra: error while loading shared libraries: libfrr.so.0: cannot open
121 shared object file: No such file or directory
122
123 The fix is to add the following line to /etc/ld.so.conf which will
124 continue to reference the library directory after the system reboots. To
125 load the library directory path immediately run the ldconfig command
126 after adding the line to the file eg:
127
128 ::
129
130 echo include /usr/local/lib >> /etc/ld.so.conf
131 ldconfig