]> git.proxmox.com Git - mirror_frr.git/blame - doc/Building_FRR_on_CentOS6.md
ospf6d: Intra-prefix LSA update after frr restart
[mirror_frr.git] / doc / Building_FRR_on_CentOS6.md
CommitLineData
278fb111
MW
1Building FRR on CentOS 6 from Git Source
2========================================
3
a63edb35
MW
4(As an alternative to this installation, you may prefer to create a FRR
5rpm package yourself and install that package instead. See instructions
6in redhat/README.rpm_build.md on how to build a rpm package)
7
278fb111
MW
8Instructions are tested with `CentOS 6.8` on `x86_64` platform
9
10CentOS 6 restrictions:
11----------------------
12
eb651bbc
MW
13- PIMd is not supported on `CentOS 6`. Upgrade to `CentOS 7` if PIMd is
14 needed
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)
6e63f8cb 17- Zebra is unable to detect what bridge/vrf an interface is associcated
18 with (IFLA_INFO_SLAVE_KIND does not exist in the kernel headers, you
19 can use a newer kernel + headers to get this functionality)
bf0526b9
BR
20- frr_reload.py will not work, as this requires Python 2.7, and CentOS 6
21 only has 2.6. You can install Python 2.7 via IUS, but it won't work
22 properly unless you compile and install the ipaddr package for it.
278fb111
MW
23
24Install required packages
25-------------------------
eb651bbc 26
278fb111
MW
27Add packages:
28
a63edb35
MW
29 sudo yum install git autoconf automake libtool make gawk \
30 readline-devel texinfo net-snmp-devel groff pkgconfig \
31 json-c-devel pam-devel flex epel-release perl-XML-LibXML \
32 c-ares-devel
278fb111 33
eb651bbc
MW
34Install newer version of bison (CentOS 6 package source is too old) from
35CentOS 7
278fb111 36
a63edb35 37 sudo yum install rpm-build
eb651bbc
MW
38 curl -O http://vault.centos.org/7.0.1406/os/Source/SPackages/bison-2.7-4.el7.src.rpm
39 rpmbuild --rebuild ./bison-2.7-4.el7.src.rpm
40 sudo yum install ./rpmbuild/RPMS/x86_64/bison-2.7-4.el6.x86_64.rpm
41 rm -rf rpmbuild
278fb111
MW
42
43Install newer version of autoconf and automake (Package versions are too old)
44
eb651bbc
MW
45 curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
46 tar xvf autoconf-2.69.tar.gz
47 cd autoconf-2.69
48 ./configure --prefix=/usr
49 make
50 sudo make install
51 cd ..
52
53 curl -O http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
54 tar xvf automake-1.15.tar.gz
55 cd automake-1.15
56 ./configure --prefix=/usr
57 make
58 sudo make install
59 cd ..
60
a63edb35 61Install `Python 2.7` in parallel to default 2.6.
ae32b152 62Make sure you've install EPEL (`epel-release` as above). Then install current
a63edb35 63`python27`, `python27-devel` and `pytest`
278fb111 64
a63edb35
MW
65 sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
66 sudo rpm -ivh https://centos6.iuscommunity.org/ius-release.rpm
67 sudo yum install python27 python27-pip python27-devel
68 sudo pip2.7 install pytest
278fb111 69
eb651bbc
MW
70Please note that `CentOS 6` needs to keep python pointing to version 2.6
71for `yum` to keep working, so don't create a symlink for python2.7 to python
ae32b152 72
278fb111
MW
73Get FRR, compile it and install it (from Git)
74---------------------------------------------
75
eb651bbc
MW
76**This assumes you want to build and install FRR from source and not using
77any packages**
278fb111
MW
78
79### Add frr groups and user
80
eb651bbc
MW
81 sudo groupadd -g 92 frr
82 sudo groupadd -r -g 85 frrvt
83 sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
447a8fe9 84 -c "FRR FRRouting suite" -d /var/run/frr frr
278fb111
MW
85
86### Download Source, configure and compile it
eb651bbc
MW
87(You may prefer different options on configure statement. These are just
88an example.)
89
d6180888 90 git clone https://github.com/frrouting/frr.git frr
eb651bbc 91 cd frr
eb651bbc
MW
92 ./bootstrap.sh
93 ./configure \
a63edb35
MW
94 --bindir=/usr/bin \
95 --sbindir=/usr/lib/frr \
eb651bbc 96 --sysconfdir=/etc/frr \
a63edb35
MW
97 --libdir=/usr/lib/frr \
98 --libexecdir=/usr/lib/frr \
eb651bbc 99 --localstatedir=/var/run/frr \
a63edb35 100 --with-moduledir=/usr/lib/frr/modules \
eb651bbc
MW
101 --disable-pimd \
102 --enable-snmp=agentx \
103 --enable-multipath=64 \
104 --enable-ospfclient=yes \
105 --enable-ospfapi=yes \
106 --enable-user=frr \
107 --enable-group=frr \
108 --enable-vty-group=frrvt \
109 --enable-rtadv \
110 --disable-exampledir \
111 --enable-watchfrr \
a63edb35 112 --disable-ldpd \
eb651bbc 113 --enable-fpm \
a63edb35
MW
114 --enable-nhrpd \
115 --enable-eigrpd \
116 --enable-babeld \
eb651bbc 117 --with-pkg-git-version \
a63edb35 118 --with-pkg-extra-version=-MyOwnFRRVersion
eb651bbc
MW
119 make
120 make check PYTHON=/usr/bin/python2.7
121 sudo make install
278fb111
MW
122
123### Create empty FRR configuration files
eb651bbc
MW
124 sudo mkdir /var/log/frr
125 sudo mkdir /etc/frr
126 sudo touch /etc/frr/zebra.conf
127 sudo touch /etc/frr/bgpd.conf
128 sudo touch /etc/frr/ospfd.conf
129 sudo touch /etc/frr/ospf6d.conf
130 sudo touch /etc/frr/isisd.conf
131 sudo touch /etc/frr/ripd.conf
132 sudo touch /etc/frr/ripngd.conf
a63edb35
MW
133 sudo touch /etc/frr/nhrpd.conf
134 sudo touch /etc/frr/eigrpd.conf
135 sudo touch /etc/frr/babeld.conf
eb651bbc
MW
136 sudo chown -R frr:frr /etc/frr/
137 sudo touch /etc/frr/vtysh.conf
138 sudo chown frr:frrvt /etc/frr/vtysh.conf
139 sudo chmod 640 /etc/frr/*.conf
278fb111 140
a63edb35
MW
141### Install daemon config file
142 sudo install -p -m 644 redhat/daemons /etc/frr/
143 sudo chown frr:frr /etc/frr/daemons
144
145### Edit /etc/frr/daemons as needed to select the required daemons
146
147Look for the section with `watchfrr_enable=...` and `zebra=...` etc.
148Enable the daemons as required by changing the value to `yes`
149
278fb111
MW
150### Enable IP & IPv6 forwarding
151
eb651bbc
MW
152Edit `/etc/sysctl.conf` and set the following values (ignore the other
153settings)
278fb111 154
eb651bbc
MW
155 # Controls IP packet forwarding
156 net.ipv4.ip_forward = 1
157 net.ipv6.conf.all.forwarding=1
278fb111 158
eb651bbc
MW
159 # Controls source route verification
160 net.ipv4.conf.default.rp_filter = 0
278fb111 161
a63edb35
MW
162Load the modifed sysctl's on the system:
163
164 sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
278fb111
MW
165
166### Add init.d startup files
a63edb35
MW
167 sudo install -p -m 755 redhat/frr.init /etc/init.d/frr
168 sudo chkconfig --add frr
169
170### Enable frr daemon at startup
171 sudo chkconfig frr on
172
173### Start FRR manually (or reboot)
174 sudo /etc/init.d/frr start