]> git.proxmox.com Git - mirror_frr.git/blame - doc/Building_FRR_on_Fedora24.md
Merge pull request #1329 from opensourcerouting/debian9-pkg
[mirror_frr.git] / doc / Building_FRR_on_Fedora24.md
CommitLineData
278fb111
MW
1Building FRR on Fedora 24 from Git Source
2=========================================
3
e3de326d
MW
4(As an alternative to this installation, you may prefer to create a FRR
5rpm package yourself and install that package instead. See instructions
6in redhat/README.rpm_build.md on how to build a rpm package)
7
278fb111
MW
8Install required packages
9-------------------------
eb651bbc 10
278fb111
MW
11Add packages:
12
eb651bbc 13 sudo dnf install git autoconf automake libtool make gawk \
e3de326d
MW
14 readline-devel texinfo net-snmp-devel groff pkgconfig \
15 json-c-devel pam-devel bison flex pytest perl-XML-LibXML \
16 c-ares-devel
278fb111
MW
17
18Get FRR, compile it and install it (from Git)
19---------------------------------------------
20
eb651bbc
MW
21**This assumes you want to build and install FRR from source and not
22using any packages**
278fb111
MW
23
24### Add frr groups and user
25
26 sudo groupadd -g 92 frr
27 sudo groupadd -r -g 85 frrvt
28 sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
447a8fe9 29 -c "FRR FRRouting suite" -d /var/run/frr frr
278fb111
MW
30
31### Download Source, configure and compile it
eb651bbc
MW
32(You may prefer different options on configure statement. These are just
33an example.)
278fb111 34
d6180888 35 git clone https://github.com/frrouting/frr.git frr
eb651bbc 36 cd frr
e3de326d 37 git checkout stable/3.0
278fb111
MW
38 ./bootstrap.sh
39 ./configure \
e3de326d
MW
40 --bindir=/usr/bin \
41 --sbindir=/usr/lib/frr \
eb651bbc 42 --sysconfdir=/etc/frr \
e3de326d
MW
43 --libdir=/usr/lib/frr \
44 --libexecdir=/usr/lib/frr \
eb651bbc 45 --localstatedir=/var/run/frr \
e3de326d 46 --with-moduledir=/usr/lib/frr/modules \
eb651bbc
MW
47 --enable-pimd \
48 --enable-snmp=agentx \
49 --enable-multipath=64 \
50 --enable-ospfclient=yes \
51 --enable-ospfapi=yes \
52 --enable-user=frr \
53 --enable-group=frr \
54 --enable-vty-group=frrvt \
55 --enable-rtadv \
56 --disable-exampledir \
57 --enable-watchfrr \
e3de326d 58 --enable-ldpd \
eb651bbc 59 --enable-fpm \
e3de326d 60 --enable-nhrpd \
eb651bbc 61 --with-pkg-git-version \
e3de326d 62 --with-pkg-extra-version=-MyOwnFRRVersion
278fb111
MW
63 make
64 make check
65 sudo make install
66
67### Create empty FRR configuration files
eb651bbc
MW
68 sudo mkdir /var/log/frr
69 sudo mkdir /etc/frr
70 sudo touch /etc/frr/zebra.conf
71 sudo touch /etc/frr/bgpd.conf
72 sudo touch /etc/frr/ospfd.conf
73 sudo touch /etc/frr/ospf6d.conf
74 sudo touch /etc/frr/isisd.conf
75 sudo touch /etc/frr/ripd.conf
76 sudo touch /etc/frr/ripngd.conf
77 sudo touch /etc/frr/pimd.conf
78 sudo touch /etc/frr/ldpd.conf
97b02007 79 sudo touch /etc/frr/nhrpd.conf
eb651bbc
MW
80 sudo chown -R frr:frr /etc/frr/
81 sudo touch /etc/frr/vtysh.conf
82 sudo chown frr:frrvt /etc/frr/vtysh.conf
83 sudo chmod 640 /etc/frr/*.conf
278fb111 84
e3de326d
MW
85### Install daemon config file
86 sudo install -p -m 644 redhat/daemons /etc/frr/
87 sudo chown frr:frr /etc/frr/daemons
88
89### Edit /etc/frr/daemons as needed to select the required daemons
90
91Look for the section with `watchfrr_enable=...` and `zebra=...` etc.
92Enable the daemons as required by changing the value to `yes`
93
278fb111
MW
94### Enable IP & IPv6 forwarding (and MPLS)
95
eb651bbc
MW
96Create a new file `/etc/sysctl.d/90-routing-sysctl.conf` with the
97following content:
98(Please make sure to list all interfaces with required MPLS similar
99to `net.mpls.conf.eth0.input=1`)
278fb111
MW
100
101 # Sysctl for routing
102 #
103 # Routing: We need to forward packets
104 net.ipv4.conf.all.forwarding=1
105 net.ipv6.conf.all.forwarding=1
eb651bbc
MW
106 #
107 # Enable MPLS Label processing on all interfaces
108 net.mpls.conf.eth0.input=1
109 net.mpls.conf.eth1.input=1
110 net.mpls.conf.eth2.input=1
111 net.mpls.platform_labels=100000
278fb111 112
e3de326d
MW
113Load the modifed sysctl's on the system:
114
115 sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
116
278fb111
MW
117Create a new file `/etc/modules-load.d/mpls.conf` with the following content:
118
eb651bbc
MW
119 # Load MPLS Kernel Modules
120 mpls-router
121 mpls-iptunnel
278fb111 122
e3de326d
MW
123And load the kernel modules on the running system:
124
125 sudo modprobe mpls-router mpls-iptunnel
126
127### Install frr Service and redhat init files
128 sudo install -p -m 644 redhat/frr.service /usr/lib/systemd/system/frr.service
129 sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr
130
131### Enable required frr at startup
132 sudo systemctl enable frr
133
134### Reboot or start FRR manually
135 sudo systemctl start frr