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