]> git.proxmox.com Git - mirror_frr.git/blame - redhat/README.rpm_build.md
redhat: Replace tab's with spaces in README
[mirror_frr.git] / redhat / README.rpm_build.md
CommitLineData
447a8fe9 1Building your own FRRouting RPM
c115e4a4 2======================================
f755bf6d
MW
3(Tested on CentOS 6, CentOS 7 and Fedora 22.)
4
51. Install the following packages to build the RPMs:
6
826d8bef
MW
7 yum install git autoconf automake libtool make gawk readline-devel \
8 texinfo dejagnu net-snmp-devel groff rpm-build net-snmp-devel \
9 libcap-devel texi2html
f755bf6d 10
826d8bef
MW
11 (use `dnf install` on new Fedora instead of `yum install`)
12
c115e4a4 132. Checkout FRR under a **unpriviledged** user account
f755bf6d 14
826d8bef 15 git clone https://github.com/frrouting/frr.git frr
f755bf6d
MW
16
173. Run Bootstrap and make distribution tar.gz
18
826d8bef
MW
19 cd frr
20 ./bootstrap.sh
21 ./configure --with-pkg-extra-version=-MyRPMVersion
22 make dist
23
24 Note: configure parameters are not important for the RPM building - except the `with-pkg-extra-version` if you want to give the RPM a specific name to
25 mark your own unoffical build
f755bf6d
MW
26
274. Create RPM directory structure and populate with sources
28
826d8bef
MW
29 mkdir rpmbuild
30 mkdir rpmbuild/SOURCES
31 mkdir rpmbuild/SPECS
32 cp redhat/*.spec rpmbuild/SPECS/
33 cp frr*.tar.gz rpmbuild/SOURCES/
f755bf6d 34
c115e4a4 355. Edit rpm/SPECS/frr.spec with configuration as needed
826d8bef
MW
36 Look at the beginning of the file and adjust the following parameters to enable or disable features as required:
37
38 ################# frr configure options ####################
39 # with-feature options
f755bf6d
MW
40 %{!?with_snmp: %global with_snmp 1 }
41 %{!?with_vtysh: %global with_vtysh 1 }
42 %{!?with_ospf_te: %global with_ospf_te 1 }
826d8bef
MW
43 %{!?with_opaque_lsa: %global with_opaque_lsa 1 }
44 %{!?with_tcp_zebra: %global with_tcp_zebra 0 }
45 %{!?with_vtysh: %global with_vtysh 1 }
46 %{!?with_pam: %global with_pam 1 }
f755bf6d 47 %{!?with_ospfclient: %global with_ospfclient 1 }
826d8bef
MW
48 %{!?with_ospfapi: %global with_ospfapi 1 }
49 %{!?with_irdp: %global with_irdp 1 }
50 %{!?with_rtadv: %global with_rtadv 1 }
51 %{!?with_isisd: %global with_isisd 1 }
52 %{!?with_pimd: %global with_pimd 1 }
53 %{!?with_mpls: %global with_mpls 0 }
54 %{!?with_ldpd: %global with_ldpd 0 }
55 %{!?with_shared: %global with_shared 1 }
56 %{!?with_multipath: %global with_multipath 64 }
57 %{!?frr_user: %global frr_user frr }
58 %{!?vty_group: %global vty_group frrvt }
59 %{!?with_fpm: %global with_fpm 0 }
60 %{!?with_watchfrr: %global with_watchfrr 1 }
f755bf6d
MW
61
626. Build the RPM
63
826d8bef 64 rpmbuild --define "_topdir `pwd`/rpmbuild" -ba rpmbuild/SPECS/frr.spec
f755bf6d
MW
65
66DONE.
67
826d8bef
MW
68If all works correctly, then you should end up with the RPMs under
69`rpmbuild/RPMS` and the Source RPM under `rpmbuild/SRPMS`
f755bf6d
MW
70
71
72Enabling daemons after installation of the package:
73---------------------------------------------------
74
75### init.d based systems (ie CentOS 6):
76
771. Enable the daemons as needed to run after boot (Zebra is mandatory)
826d8bef
MW
78
79 chkconfig zebra on
80 chkconfig ospfd on
81 chkconfig ospf6d on
82 chkconfig bgpd on
83 ... etc
f755bf6d 84
c115e4a4 852. If you want to run `watchfrr`, then configure `/etc/sysconfig/frr`
9473e340
DS
86 and uncomment the line with the daemons for `watchfrr` to monitor,
87 then enable watchfrr
f755bf6d 88
826d8bef 89 chkconfig watchfrr on
f755bf6d
MW
90
913. Check your firewall / IPtables to make sure the routing protocols are
92allowed.
826d8bef 93
f755bf6d
MW
944. Start the daemons (or reboot)
95
826d8bef
MW
96 service zebra start
97 service bgpd start
98 service ospfd start
99 ... etc
100
c115e4a4 101Configuration is stored in `/etc/frr/*.conf` files.
f755bf6d
MW
102
103
104### systemd based systems (ie CentOS 7, Fedora 22)
105
1061. Enable the daemons as needed to run after boot (Zebra is mandatory)
826d8bef
MW
107
108 systemctl enable zebra
109 systemctl enable ospfd
110 systemctl enable ospf6d
111 systemctl enable bgpd
112 ... etc
f755bf6d 113
826d8bef
MW
114 Note: There is no watchfrr on systemd based systems. Systemd contains
115 the functionality of monitoring and restarting daemons.
f755bf6d
MW
116
1172. Check your firewall / IPtables to make sure the routing protocols are
118allowed.
826d8bef 119
f755bf6d
MW
1203. Start the daemons (or reboot)
121
826d8bef
MW
122 systemctl start zebra
123 systemctl start bgpd
124 systemctl start ospfd
125 ... etc
126
c115e4a4 127Configuration is stored in `/etc/frr/*.conf` files.
f755bf6d 128