]> git.proxmox.com Git - mirror_frr.git/blob - doc/developer/building-frr-for-fedora24.rst
Merge pull request #2944 from thbtcllt/master
[mirror_frr.git] / doc / developer / building-frr-for-fedora24.rst
1 Fedora 24
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 Install required packages
9 -------------------------
10
11 Add packages:
12
13 ::
14
15 sudo dnf install git autoconf automake libtool make gawk \
16 readline-devel texinfo net-snmp-devel groff pkgconfig \
17 json-c-devel pam-devel perl-XML-LibXML pytest bison flex \
18 c-ares-devel python3-devel python3-sphinx
19
20 Get FRR, compile it and install it (from Git)
21 ---------------------------------------------
22
23 **This assumes you want to build and install FRR from source and not
24 using any packages**
25
26 Add frr groups and user
27 ^^^^^^^^^^^^^^^^^^^^^^^
28
29 ::
30
31 sudo groupadd -g 92 frr
32 sudo groupadd -r -g 85 frrvty
33 sudo useradd -u 92 -g 92 -M -r -G frrvty -s /sbin/nologin \
34 -c "FRR FRRouting suite" -d /var/run/frr frr
35
36 Download Source, configure and compile it
37 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38
39 (You may prefer different options on configure statement. These are just
40 an example.)
41
42 ::
43
44 git clone https://github.com/frrouting/frr.git frr
45 cd frr
46 ./bootstrap.sh
47 ./configure \
48 --bindir=/usr/bin \
49 --sbindir=/usr/lib/frr \
50 --sysconfdir=/etc/frr \
51 --libdir=/usr/lib/frr \
52 --libexecdir=/usr/lib/frr \
53 --localstatedir=/var/run/frr \
54 --with-moduledir=/usr/lib/frr/modules \
55 --enable-pimd \
56 --enable-snmp=agentx \
57 --enable-multipath=64 \
58 --enable-ospfclient=yes \
59 --enable-ospfapi=yes \
60 --enable-user=frr \
61 --enable-group=frr \
62 --enable-vty-group=frrvty \
63 --enable-rtadv \
64 --disable-exampledir \
65 --enable-watchfrr \
66 --enable-ldpd \
67 --enable-fpm \
68 --enable-nhrpd \
69 --enable-eigrpd \
70 --enable-babeld \
71 --with-pkg-git-version \
72 --with-pkg-extra-version=-MyOwnFRRVersion
73 make
74 make check
75 sudo make install
76
77 Create empty FRR configuration files
78 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79
80 ::
81
82 sudo mkdir /var/log/frr
83 sudo mkdir /etc/frr
84 sudo touch /etc/frr/zebra.conf
85 sudo touch /etc/frr/bgpd.conf
86 sudo touch /etc/frr/ospfd.conf
87 sudo touch /etc/frr/ospf6d.conf
88 sudo touch /etc/frr/isisd.conf
89 sudo touch /etc/frr/ripd.conf
90 sudo touch /etc/frr/ripngd.conf
91 sudo touch /etc/frr/pimd.conf
92 sudo touch /etc/frr/ldpd.conf
93 sudo touch /etc/frr/nhrpd.conf
94 sudo touch /etc/frr/eigrpd.conf
95 sudo touch /etc/frr/babeld.conf
96 sudo chown -R frr:frr /etc/frr/
97 sudo touch /etc/frr/vtysh.conf
98 sudo chown frr:frrvty /etc/frr/vtysh.conf
99 sudo chmod 640 /etc/frr/*.conf
100
101 Install daemon config file
102 ^^^^^^^^^^^^^^^^^^^^^^^^^^
103
104 ::
105
106 sudo install -p -m 644 redhat/daemons /etc/frr/
107 sudo chown frr:frr /etc/frr/daemons
108
109 Edit /etc/frr/daemons as needed to select the required daemons
110 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
111
112 Look for the section with ``watchfrr_enable=...`` and ``zebra=...`` etc.
113 Enable the daemons as required by changing the value to ``yes``
114
115 Enable IP & IPv6 forwarding (and MPLS)
116 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117
118 Create a new file ``/etc/sysctl.d/90-routing-sysctl.conf`` with the
119 following content: (Please make sure to list all interfaces with
120 required MPLS similar to ``net.mpls.conf.eth0.input=1``)
121
122 ::
123
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 #
130 # Enable MPLS Label processing on all interfaces
131 net.mpls.conf.eth0.input=1
132 net.mpls.conf.eth1.input=1
133 net.mpls.conf.eth2.input=1
134 net.mpls.platform_labels=100000
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 Create a new file ``/etc/modules-load.d/mpls.conf`` with the following
143 content:
144
145 ::
146
147 # Load MPLS Kernel Modules
148 mpls-router
149 mpls-iptunnel
150
151 And load the kernel modules on the running system:
152
153 ::
154
155 sudo modprobe mpls-router mpls-iptunnel
156
157 Install frr Service and redhat init files
158 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
159
160 ::
161
162 sudo install -p -m 644 redhat/frr.service /usr/lib/systemd/system/frr.service
163 sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr
164
165 Enable required frr at startup
166 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
167
168 ::
169
170 sudo systemctl enable frr
171
172 Reboot or start FRR manually
173 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
174
175 ::
176
177 sudo systemctl start frr