]> git.proxmox.com Git - mirror_frr.git/blob - doc/developer/building-frr-for-centos7.rst
pimd, doc: remove dead import check references
[mirror_frr.git] / doc / developer / building-frr-for-centos7.rst
1 CentOS 7
2 ========================================
3
4 This document describes installation from source. If you want to build an RPM,
5 see :ref:`packaging-redhat`.
6
7 CentOS 7 restrictions:
8 ----------------------
9
10 - MPLS is not supported on ``CentOS 7`` with default kernel. MPLS
11 requires Linux Kernel 4.5 or higher (LDP can be built, but may have
12 limited use without MPLS)
13
14 Install required packages
15 -------------------------
16
17 Add packages:
18
19 ::
20
21 sudo yum install git autoconf automake libtool make \
22 readline-devel texinfo net-snmp-devel groff pkgconfig \
23 json-c-devel pam-devel bison flex pytest c-ares-devel \
24 python-devel python-sphinx libcap-devel \
25 elfutils-libelf-devel libunwind-devel protobuf-c-devel
26
27 .. include:: building-libunwind-note.rst
28
29 .. include:: building-libyang.rst
30
31 Get FRR, compile it and install it (from Git)
32 ---------------------------------------------
33
34 **This assumes you want to build and install FRR from source and not
35 using any packages**
36
37 Add frr groups and user
38 ^^^^^^^^^^^^^^^^^^^^^^^
39
40 ::
41
42 sudo groupadd -g 92 frr
43 sudo groupadd -r -g 85 frrvty
44 sudo useradd -u 92 -g 92 -M -r -G frrvty -s /sbin/nologin \
45 -c "FRR FRRouting suite" -d /var/run/frr frr
46
47 Download Source, configure and compile it
48 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49
50 (You may prefer different options on configure statement. These are just
51 an example.)
52
53 ::
54
55 git clone https://github.com/frrouting/frr.git frr
56 cd frr
57 ./bootstrap.sh
58 ./configure \
59 --bindir=/usr/bin \
60 --sbindir=/usr/lib/frr \
61 --sysconfdir=/etc/frr \
62 --libdir=/usr/lib/frr \
63 --libexecdir=/usr/lib/frr \
64 --localstatedir=/var/run/frr \
65 --with-moduledir=/usr/lib/frr/modules \
66 --enable-snmp=agentx \
67 --enable-multipath=64 \
68 --enable-user=frr \
69 --enable-group=frr \
70 --enable-vty-group=frrvty \
71 --disable-ldpd \
72 --enable-fpm \
73 --with-pkg-git-version \
74 --with-pkg-extra-version=-MyOwnFRRVersion \
75 SPHINXBUILD=/usr/bin/sphinx-build
76 make
77 make check
78 sudo make install
79
80 Create empty FRR configuration files
81 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82
83 ::
84
85 sudo mkdir /var/log/frr
86 sudo mkdir /etc/frr
87 sudo touch /etc/frr/zebra.conf
88 sudo touch /etc/frr/bgpd.conf
89 sudo touch /etc/frr/ospfd.conf
90 sudo touch /etc/frr/ospf6d.conf
91 sudo touch /etc/frr/isisd.conf
92 sudo touch /etc/frr/ripd.conf
93 sudo touch /etc/frr/ripngd.conf
94 sudo touch /etc/frr/pimd.conf
95 sudo touch /etc/frr/nhrpd.conf
96 sudo touch /etc/frr/eigrpd.conf
97 sudo touch /etc/frr/babeld.conf
98 sudo chown -R frr:frr /etc/frr/
99 sudo touch /etc/frr/vtysh.conf
100 sudo chown frr:frrvty /etc/frr/vtysh.conf
101 sudo chmod 640 /etc/frr/*.conf
102
103 Install daemon config file
104 ^^^^^^^^^^^^^^^^^^^^^^^^^^
105
106 ::
107
108 sudo install -p -m 644 tools/etc/frr/daemons /etc/frr/
109 sudo chown frr:frr /etc/frr/daemons
110
111 Edit /etc/frr/daemons as needed to select the required daemons
112 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113
114 Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc.
115 Enable the daemons as required by changing the value to ``yes``
116
117 Enable IP & IPv6 forwarding
118 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
119
120 Create a new file ``/etc/sysctl.d/90-routing-sysctl.conf`` with the
121 following content:
122
123 ::
124
125 # Sysctl for routing
126 #
127 # Routing: We need to forward packets
128 net.ipv4.conf.all.forwarding=1
129 net.ipv6.conf.all.forwarding=1
130
131 Load the modified sysctl's on the system:
132
133 ::
134
135 sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
136
137 Install frr Service
138 ^^^^^^^^^^^^^^^^^^^
139
140 ::
141
142 sudo install -p -m 644 tools/frr.service /usr/lib/systemd/system/frr.service
143
144 Register the systemd files
145 ^^^^^^^^^^^^^^^^^^^^^^^^^^
146
147 ::
148
149 sudo systemctl preset frr.service
150
151 Enable required frr at startup
152 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
153
154 ::
155
156 sudo systemctl enable frr
157
158 Reboot or start FRR manually
159 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
160
161 ::
162
163 sudo systemctl start frr