1 Building FRR on CentOS 6 from Git Source
2 ========================================
4 (As an alternative to this installation, you may prefer to create a FRR
5 rpm package yourself and install that package instead. See instructions
6 in redhat/README.rpm_build.md on how to build a rpm package)
8 Instructions are tested with `CentOS 6.8` on `x86_64` platform
10 CentOS 6 restrictions:
11 ----------------------
13 - PIMd is not supported on `CentOS 6`. Upgrade to `CentOS 7` if PIMd is
15 - MPLS is not supported on `CentOS 6`. MPLS requires Linux Kernel 4.5 or
16 higher (LDP can be built, but may have limited use without MPLS)
18 Install required packages
19 -------------------------
23 sudo yum install git autoconf automake libtool make gawk \
24 readline-devel texinfo net-snmp-devel groff pkgconfig \
25 json-c-devel pam-devel flex epel-release perl-XML-LibXML \
28 Install newer version of bison (CentOS 6 package source is too old) from
31 sudo yum install rpm-build
32 curl -O http://vault.centos.org/7.0.1406/os/Source/SPackages/bison-2.7-4.el7.src.rpm
33 rpmbuild --rebuild ./bison-2.7-4.el7.src.rpm
34 sudo yum install ./rpmbuild/RPMS/x86_64/bison-2.7-4.el6.x86_64.rpm
37 Install newer version of autoconf and automake (Package versions are too old)
39 curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
40 tar xvf autoconf-2.69.tar.gz
42 ./configure --prefix=/usr
47 curl -O http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
48 tar xvf automake-1.15.tar.gz
50 ./configure --prefix=/usr
55 Install `Python 2.7` in parallel to default 2.6 (needed for `make check` to
57 Pick correct EPEL based on CentOS version used. Then install current `pytest`
59 sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
60 sudo rpm -ivh https://centos6.iuscommunity.org/ius-release.rpm
61 sudo yum install python27 python27-pip
62 sudo pip2.7 install pytest
64 Please note that `CentOS 6` needs to keep python pointing to version 2.6
65 for `yum` to keep working, so don't create a symlink for python2.7 to python
67 Get FRR, compile it and install it (from Git)
68 ---------------------------------------------
70 **This assumes you want to build and install FRR from source and not using
73 ### Add frr groups and user
75 sudo groupadd -g 92 frr
76 sudo groupadd -r -g 85 frrvt
77 sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
78 -c "FRR FRRouting suite" -d /var/run/frr frr
80 ### Download Source, configure and compile it
81 (You may prefer different options on configure statement. These are just
84 git clone https://github.com/frrouting/frr.git frr
86 git checkout stable/3.0
90 --sbindir=/usr/lib/frr \
91 --sysconfdir=/etc/frr \
92 --libdir=/usr/lib/frr \
93 --libexecdir=/usr/lib/frr \
94 --localstatedir=/var/run/frr \
95 --with-moduledir=/usr/lib/frr/modules \
97 --enable-snmp=agentx \
98 --enable-multipath=64 \
99 --enable-ospfclient=yes \
100 --enable-ospfapi=yes \
103 --enable-vty-group=frrvt \
105 --disable-exampledir \
110 --with-pkg-git-version \
111 --with-pkg-extra-version=-MyOwnFRRVersion
113 make check PYTHON=/usr/bin/python2.7
116 ### Create empty FRR configuration files
117 sudo mkdir /var/log/frr
119 sudo touch /etc/frr/zebra.conf
120 sudo touch /etc/frr/bgpd.conf
121 sudo touch /etc/frr/ospfd.conf
122 sudo touch /etc/frr/ospf6d.conf
123 sudo touch /etc/frr/isisd.conf
124 sudo touch /etc/frr/ripd.conf
125 sudo touch /etc/frr/ripngd.conf
126 sudo touch /etc/frr/nhrpd.conf
127 sudo chown -R frr:frr /etc/frr/
128 sudo touch /etc/frr/vtysh.conf
129 sudo chown frr:frrvt /etc/frr/vtysh.conf
130 sudo chmod 640 /etc/frr/*.conf
132 ### Install daemon config file
133 sudo install -p -m 644 redhat/daemons /etc/frr/
134 sudo chown frr:frr /etc/frr/daemons
136 ### Edit /etc/frr/daemons as needed to select the required daemons
138 Look for the section with `watchfrr_enable=...` and `zebra=...` etc.
139 Enable the daemons as required by changing the value to `yes`
141 ### Enable IP & IPv6 forwarding
143 Edit `/etc/sysctl.conf` and set the following values (ignore the other
146 # Controls IP packet forwarding
147 net.ipv4.ip_forward = 1
148 net.ipv6.conf.all.forwarding=1
150 # Controls source route verification
151 net.ipv4.conf.default.rp_filter = 0
153 Load the modifed sysctl's on the system:
155 sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
157 ### Add init.d startup files
158 sudo install -p -m 755 redhat/frr.init /etc/init.d/frr
159 sudo chkconfig --add frr
161 ### Enable frr daemon at startup
162 sudo chkconfig frr on
164 ### Start FRR manually (or reboot)
165 sudo /etc/init.d/frr start