]>
Commit | Line | Data |
---|---|---|
d1890d04 | 1 | CentOS 7 |
278fb111 MW |
2 | ======================================== |
3 | ||
a63edb35 MW |
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 | |
d1890d04 | 6 | in redhat/README.rpm\_build.md on how to build a rpm package) |
a63edb35 | 7 | |
278fb111 MW |
8 | CentOS 7 restrictions: |
9 | ---------------------- | |
10 | ||
d1890d04 QY |
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 | ||
278fb111 MW |
15 | Install required packages |
16 | ------------------------- | |
ae32b152 | 17 | |
278fb111 MW |
18 | Add packages: |
19 | ||
d1890d04 QY |
20 | :: |
21 | ||
a63edb35 MW |
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 \ | |
9580f50d | 25 | python-devel systemd-devel python-sphinx |
278fb111 | 26 | |
fc5a4adc RW |
27 | .. include:: building-libyang.rst |
28 | ||
278fb111 MW |
29 | Get FRR, compile it and install it (from Git) |
30 | --------------------------------------------- | |
31 | ||
d1890d04 QY |
32 | **This assumes you want to build and install FRR from source and not |
33 | using any packages** | |
34 | ||
35 | Add frr groups and user | |
75ca3b11 | 36 | ^^^^^^^^^^^^^^^^^^^^^^^ |
278fb111 | 37 | |
d1890d04 | 38 | :: |
278fb111 | 39 | |
eb651bbc | 40 | sudo groupadd -g 92 frr |
2f62815f DS |
41 | sudo groupadd -r -g 85 frrvty |
42 | sudo useradd -u 92 -g 92 -M -r -G frrvty -s /sbin/nologin \ | |
447a8fe9 | 43 | -c "FRR FRRouting suite" -d /var/run/frr frr |
278fb111 | 44 | |
d1890d04 | 45 | Download Source, configure and compile it |
75ca3b11 | 46 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
d1890d04 QY |
47 | |
48 | (You may prefer different options on configure statement. These are just | |
eb651bbc MW |
49 | an example.) |
50 | ||
d1890d04 QY |
51 | :: |
52 | ||
d6180888 | 53 | git clone https://github.com/frrouting/frr.git frr |
eb651bbc | 54 | cd frr |
eb651bbc MW |
55 | ./bootstrap.sh |
56 | ./configure \ | |
a63edb35 MW |
57 | --bindir=/usr/bin \ |
58 | --sbindir=/usr/lib/frr \ | |
eb651bbc | 59 | --sysconfdir=/etc/frr \ |
a63edb35 MW |
60 | --libdir=/usr/lib/frr \ |
61 | --libexecdir=/usr/lib/frr \ | |
eb651bbc | 62 | --localstatedir=/var/run/frr \ |
a63edb35 | 63 | --with-moduledir=/usr/lib/frr/modules \ |
eb651bbc MW |
64 | --enable-snmp=agentx \ |
65 | --enable-multipath=64 \ | |
eb651bbc MW |
66 | --enable-user=frr \ |
67 | --enable-group=frr \ | |
2f62815f | 68 | --enable-vty-group=frrvty \ |
e062e87d | 69 | --enable-systemd=yes \ |
eb651bbc | 70 | --disable-exampledir \ |
a63edb35 | 71 | --disable-ldpd \ |
eb651bbc MW |
72 | --enable-fpm \ |
73 | --with-pkg-git-version \ | |
a63edb35 | 74 | --with-pkg-extra-version=-MyOwnFRRVersion |
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 | ||
a63edb35 MW |
107 | sudo install -p -m 644 redhat/daemons /etc/frr/ |
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 | ||
a63edb35 | 130 | Load the modifed 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 | ||
d1890d04 | 136 | Install frr Service and redhat init files |
75ca3b11 | 137 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
d1890d04 QY |
138 | |
139 | :: | |
140 | ||
a63edb35 MW |
141 | sudo install -p -m 644 redhat/frr.service /usr/lib/systemd/system/frr.service |
142 | sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr | |
278fb111 | 143 | |
d1890d04 | 144 | Register the systemd files |
75ca3b11 | 145 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
d1890d04 QY |
146 | |
147 | :: | |
148 | ||
a63edb35 | 149 | sudo systemctl preset frr.service |
d1890d04 QY |
150 | |
151 | Enable required frr at startup | |
75ca3b11 | 152 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
d1890d04 QY |
153 | |
154 | :: | |
155 | ||
a63edb35 MW |
156 | sudo systemctl enable frr |
157 | ||
d1890d04 | 158 | Reboot or start FRR manually |
75ca3b11 | 159 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
d1890d04 QY |
160 | |
161 | :: | |
162 | ||
a63edb35 | 163 | sudo systemctl start frr |