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