4 ========================================
6 This document describes installation from source. If you want to build an RPM,
7 see :ref:`packaging-redhat`.
9 Instructions are tested with ``CentOS 6.8`` on ``x86_64`` platform
13 ``CentOS 6`` is very old and not fully supported by the FRR community
14 anymore. Building FRR takes multiple manual steps to update the build
15 system with newer packages than what's available from the archives.
16 However, the built packages can still be installed afterwards on
17 a standard ``CentOS 6`` without any special packages.
19 Support for CentOS 6 is now on a best-effort base by the community.
21 CentOS 6 restrictions:
22 ----------------------
24 - PIMd is not supported on ``CentOS 6``. Upgrade to ``CentOS 7`` if
26 - MPLS is not supported on ``CentOS 6``. MPLS requires Linux Kernel 4.5
27 or higher (LDP can be built, but may have limited use without MPLS)
28 - Zebra is unable to detect what bridge/vrf an interface is associcated
29 with (IFLA\_INFO\_SLAVE\_KIND does not exist in the kernel headers,
30 you can use a newer kernel + headers to get this functionality)
31 - frr\_reload.py will not work, as this requires Python 2.7, and CentOS
32 6 only has 2.6. You can install Python 2.7 via IUS, but it won't work
33 properly unless you compile and install the ipaddr package for it.
34 - Building the package requires Sphinx >= 1.1. Only a non-standard
35 package provides a newer sphinx and requires manual installation
39 Install required packages
40 -------------------------
46 sudo yum install git autoconf automake libtool make gawk \
47 readline-devel texinfo net-snmp-devel groff pkgconfig \
48 json-c-devel pam-devel flex epel-release c-ares-devel
50 Install newer version of bison (CentOS 6 package source is too old) from CentOS
55 sudo yum install rpm-build
56 curl -O http://vault.centos.org/7.0.1406/os/Source/SPackages/bison-2.7-4.el7.src.rpm
57 rpmbuild --rebuild ./bison-2.7-4.el7.src.rpm
58 sudo yum install ./rpmbuild/RPMS/x86_64/bison-2.7-4.el6.x86_64.rpm
61 Install newer version of autoconf and automake (Package versions are too old):
65 curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
66 tar xvf autoconf-2.69.tar.gz
68 ./configure --prefix=/usr
73 curl -O http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
74 tar xvf automake-1.15.tar.gz
76 ./configure --prefix=/usr
81 Install ``Python 2.7`` in parallel to default 2.6. Make sure you've install
82 EPEL (``epel-release`` as above). Then install current ``python27``:
83 ``python27-devel`` and ``pytest``
87 sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
88 sudo rpm -ivh https://centos6.iuscommunity.org/ius-release.rpm
89 sudo yum install python27 python27-pip python27-devel
90 sudo pip2.7 install pytest
92 Please note that ``CentOS 6`` needs to keep python pointing to version 2.6 for
93 ``yum`` to keep working, so don't create a symlink for python2.7 to python.
95 Install newer ``Sphinx-Build`` based on ``Python 2.7``.
97 Create a new repo ``/etc/yum.repos.d/puias6.repo`` with the following contents:
101 ### Name: RPM Repository for RHEL 6 - PUIAS (used for Sphinx-Build)
102 ### URL: http://springdale.math.ias.edu/data/puias/computational
103 [puias-computational]
104 name = RPM Repository for RHEL 6 - Sphinx-Build
105 baseurl = http://springdale.math.ias.edu/data/puias/computational/$releasever/$basearch
112 Update rpm database & Install newer sphinx
114 .. code-block:: shell
117 sudo yum install python27-sphinx
119 .. include:: building-libyang.rst
121 Get FRR, compile it and install it (from Git)
122 ---------------------------------------------
124 **This assumes you want to build and install FRR from source and not using any
127 Add frr groups and user
128 ^^^^^^^^^^^^^^^^^^^^^^^
130 .. code-block:: shell
132 sudo groupadd -g 92 frr
133 sudo groupadd -r -g 85 frrvty
134 sudo useradd -u 92 -g 92 -M -r -G frrvty -s /sbin/nologin \
135 -c "FRR FRRouting suite" -d /var/run/frr frr
137 Download Source, configure and compile it
138 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140 (You may prefer different options on configure statement. These are just
143 .. code-block:: shell
145 git clone https://github.com/frrouting/frr.git frr
150 --sbindir=/usr/lib/frr \
151 --sysconfdir=/etc/frr \
152 --libdir=/usr/lib/frr \
153 --libexecdir=/usr/lib/frr \
154 --localstatedir=/var/run/frr \
155 --with-moduledir=/usr/lib/frr/modules \
157 --enable-snmp=agentx \
158 --enable-multipath=64 \
161 --enable-vty-group=frrvty \
162 --disable-exampledir \
165 --with-pkg-git-version \
166 --with-pkg-extra-version=-MyOwnFRRVersion \
167 SPHINXBUILD=sphinx-build2.7
169 make check PYTHON=/usr/bin/python2.7
172 Create empty FRR configuration files
173 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
175 .. code-block:: shell
177 sudo mkdir /var/log/frr
180 For integrated config file:
182 .. code-block:: shell
184 sudo touch /etc/frr/frr.conf
186 For individual config files:
188 .. note:: Integrated config is preferred to individual config.
190 .. code-block:: shell
192 sudo touch /etc/frr/babeld.conf
193 sudo touch /etc/frr/bfdd.conf
194 sudo touch /etc/frr/bgpd.conf
195 sudo touch /etc/frr/eigrpd.conf
196 sudo touch /etc/frr/isisd.conf
197 sudo touch /etc/frr/ldpd.conf
198 sudo touch /etc/frr/nhrpd.conf
199 sudo touch /etc/frr/ospf6d.conf
200 sudo touch /etc/frr/ospfd.conf
201 sudo touch /etc/frr/pbrd.conf
202 sudo touch /etc/frr/pimd.conf
203 sudo touch /etc/frr/ripd.conf
204 sudo touch /etc/frr/ripngd.conf
205 sudo touch /etc/frr/staticd.conf
206 sudo touch /etc/frr/zebra.conf
207 sudo chown -R frr:frr /etc/frr/
208 sudo touch /etc/frr/vtysh.conf
209 sudo chown frr:frrvty /etc/frr/vtysh.conf
210 sudo chmod 640 /etc/frr/*.conf
212 Install daemon config file
213 ^^^^^^^^^^^^^^^^^^^^^^^^^^
215 .. code-block:: shell
217 sudo install -p -m 644 redhat/daemons /etc/frr/
218 sudo chown frr:frr /etc/frr/daemons
220 Edit /etc/frr/daemons as needed to select the required daemons
221 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
223 Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc.
224 Enable the daemons as required by changing the value to ``yes``
226 Enable IP & IPv6 forwarding
227 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
229 Edit :file:`/etc/sysctl.conf` and set the following values (ignore the other
232 # Controls IP packet forwarding
233 net.ipv4.ip_forward = 1
234 net.ipv6.conf.all.forwarding=1
236 # Controls source route verification
237 net.ipv4.conf.default.rp_filter = 0
239 Load the modifed sysctl's on the system:
241 .. code-block:: shell
243 sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
245 Add init.d startup files
246 ^^^^^^^^^^^^^^^^^^^^^^^^
248 .. code-block:: shell
250 sudo install -p -m 755 redhat/frr.init /etc/init.d/frr
251 sudo chkconfig --add frr
253 Enable FRR daemon at startup
254 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
256 .. code-block:: shell
258 sudo chkconfig frr on
260 Start FRR manually (or reboot)
261 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
263 .. code-block:: shell
265 sudo /etc/init.d/frr start