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