]> git.proxmox.com Git - mirror_frr.git/blob - doc/Building_FRR_on_Fedora24.md
doc: Fixed a few typos on Building Doc's, Changed Tab's to spaces and limited line...
[mirror_frr.git] / doc / Building_FRR_on_Fedora24.md
1 Building FRR on Fedora 24 from Git Source
2 =========================================
3
4 Install required packages
5 -------------------------
6
7 Add packages:
8
9 sudo dnf install git autoconf automake libtool make gawk \
10 readline-devel texinfo net-snmp-devel groff pkgconfig \
11 json-c-devel pam-devel perl-XML-LibXML pytest
12
13 Get FRR, compile it and install it (from Git)
14 ---------------------------------------------
15
16 **This assumes you want to build and install FRR from source and not
17 using any packages**
18
19 ### Add frr groups and user
20
21 sudo groupadd -g 92 frr
22 sudo groupadd -r -g 85 frrvt
23 sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
24 -c "FRR FreeRangeRouting suite" -d /var/run/frr frr
25
26 ### Download Source, configure and compile it
27 (You may prefer different options on configure statement. These are just
28 an example.)
29
30 You may want to pay special attention to `/usr/lib64` paths and change
31 them if you are not building on a x86_64 architecture
32
33 git clone https://github.com/freerangerouting/frr.git frr
34 cd frr
35 git checkout stable/2.0
36 ./bootstrap.sh
37 ./configure \
38 --sysconfdir=/etc/frr \
39 --libdir=/usr/lib64/frr \
40 --libexecdir=/usr/lib64/frr \
41 --localstatedir=/var/run/frr \
42 --enable-pimd \
43 --enable-snmp=agentx \
44 --enable-multipath=64 \
45 --enable-ospfclient=yes \
46 --enable-ospfapi=yes \
47 --enable-user=frr \
48 --enable-group=frr \
49 --enable-vty-group=frrvt \
50 --enable-rtadv \
51 --disable-exampledir \
52 --enable-watchfrr \
53 --enable-tcp-zebra \
54 --enable-fpm \
55 --with-pkg-git-version \
56 --with-pkg-extra-version=-MyOwnFRRVersion
57 make
58 make check
59 sudo make install
60
61 ### Create empty FRR configuration files
62 sudo mkdir /var/log/frr
63 sudo mkdir /etc/frr
64 sudo touch /etc/frr/zebra.conf
65 sudo touch /etc/frr/bgpd.conf
66 sudo touch /etc/frr/ospfd.conf
67 sudo touch /etc/frr/ospf6d.conf
68 sudo touch /etc/frr/isisd.conf
69 sudo touch /etc/frr/ripd.conf
70 sudo touch /etc/frr/ripngd.conf
71 sudo touch /etc/frr/pimd.conf
72 sudo touch /etc/frr/ldpd.conf
73 sudo chown -R frr:frr /etc/frr/
74 sudo touch /etc/frr/vtysh.conf
75 sudo chown frr:frrvt /etc/frr/vtysh.conf
76 sudo chmod 640 /etc/frr/*.conf
77
78 ### Enable IP & IPv6 forwarding (and MPLS)
79
80 Create a new file `/etc/sysctl.d/90-routing-sysctl.conf` with the
81 following content:
82 (Please make sure to list all interfaces with required MPLS similar
83 to `net.mpls.conf.eth0.input=1`)
84
85 # Sysctl for routing
86 #
87 # Routing: We need to forward packets
88 net.ipv4.conf.all.forwarding=1
89 net.ipv6.conf.all.forwarding=1
90 #
91 # Enable MPLS Label processing on all interfaces
92 net.mpls.conf.eth0.input=1
93 net.mpls.conf.eth1.input=1
94 net.mpls.conf.eth2.input=1
95 net.mpls.platform_labels=100000
96
97 Create a new file `/etc/modules-load.d/mpls.conf` with the following content:
98
99 # Load MPLS Kernel Modules
100 mpls-router
101 mpls-iptunnel
102
103 **Reboot** or use `sysctl` to apply the same config to the running system
104
105 ### Install Service files
106 install -p -m 644 redhat/zebra.service /usr/lib/systemd/system/zebra.service
107 install -p -m 644 redhat/isisd.service /usr/lib/systemd/system/isisd.service
108 install -p -m 644 redhat/ripd.service /usr/lib/systemd/system/ripd.service
109 install -p -m 644 redhat/ospfd.service /usr/lib/systemd/system/ospfd.service
110 install -p -m 644 redhat/bgpd.service /usr/lib/systemd/system/bgpd.service
111 install -p -m 644 redhat/ospf6d.service /usr/lib/systemd/system/ospf6d.service
112 install -p -m 644 redhat/ripngd.service /usr/lib/systemd/system/ripngd.service
113 install -p -m 644 redhat/pimd.service /usr/lib/systemd/system/pimd.service
114 install -p -m 644 redhat/pimd.service /usr/lib/systemd/system/ldpd.service
115 install -p -m 644 redhat/frr.sysconfig /etc/sysconfig/frr
116 install -p -m 644 redhat/frr.logrotate /etc/logrotate.d/frr
117
118 ### Register the systemd files
119 systemctl preset zebra.service
120 systemctl preset ripd.service
121 systemctl preset ospfd.service
122 systemctl preset bgpd.service
123 systemctl preset ospf6d.service
124 systemctl preset ripngd.service
125 systemctl preset pimd.service
126 systemctl preset ldpd.service
127
128 ### Enable required daemons at startup
129 Only enable zebra and the daemons which are needed for your setup
130
131 systemctl enable zebra
132 systemctl enable ospfd
133 systemctl enable bgpd
134 [...] etc (as needed)