]> git.proxmox.com Git - mirror_frr.git/blob - redhat/README.rpm_build.md
db3c7d45c83f8e97702ee86a67fc83d7a2d45902
[mirror_frr.git] / redhat / README.rpm_build.md
1 Building your own FreeRangeRouting RPM
2 ======================================
3 (Tested on CentOS 6, CentOS 7 and Fedora 22.)
4
5 1. Install the following packages to build the RPMs:
6
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
10
11 (use `dnf install` on new Fedora instead of `yum install `)
12
13 2. Checkout FRR under a **unpriviledged** user account
14
15 git clone https://github.com/freerangerouting/frr.git frr
16
17 3. Run Bootstrap and make distribution tar.gz
18
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
25 `with-pkg-extra-version` if you want to give the RPM a specific name to
26 mark your own unoffical build
27
28 4. Create RPM directory structure and populate with sources
29
30 mkdir rpmbuild
31 mkdir rpmbuild/SOURCES
32 mkdir rpmbuild/SPECS
33 cp redhat/*.spec rpmbuild/SPECS/
34 cp frr*.tar.gz rpmbuild/SOURCES/
35
36 5. Edit rpm/SPECS/frr.spec with configuration as needed
37 Look at the beginning of the file and adjust the following parameters to enable
38 or disable features as required:
39
40 ################# frr configure options ####################
41 # with-feature options
42 %{!?with_snmp: %global with_snmp 1 }
43 %{!?with_vtysh: %global with_vtysh 1 }
44 %{!?with_ospf_te: %global with_ospf_te 1 }
45 %{!?with_opaque_lsa: %global with_opaque_lsa 1 }
46 %{!?with_tcp_zebra: %global with_tcp_zebra 0 }
47 %{!?with_vtysh: %global with_vtysh 1 }
48 %{!?with_pam: %global with_pam 1 }
49 %{!?with_ospfclient: %global with_ospfclient 1 }
50 %{!?with_ospfapi: %global with_ospfapi 1 }
51 %{!?with_irdp: %global with_irdp 1 }
52 %{!?with_rtadv: %global with_rtadv 1 }
53 %{!?with_isisd: %global with_isisd 1 }
54 %{!?with_pimd: %global with_pimd 1 }
55 %{!?with_mpls: %global with_mpls 0 }
56 %{!?with_ldpd: %global with_ldpd 0 }
57 %{!?with_shared: %global with_shared 1 }
58 %{!?with_multipath: %global with_multipath 64 }
59 %{!?frr_user: %global frr_user frr }
60 %{!?vty_group: %global vty_group frrvt }
61 %{!?with_fpm: %global with_fpm 0 }
62 %{!?with_watchfrr: %global with_watchfrr 1 }
63
64 6. Build the RPM
65
66 rpmbuild --define "_topdir `pwd`/rpmbuild" -ba rpmbuild/SPECS/frr.spec
67
68 DONE.
69
70 If all works correctly, then you should end up with the RPMs under `rpmbuild/RPMS`
71 and the Source RPM under `rpmbuild/SRPMS`
72
73
74 Enabling daemons after installation of the package:
75 ---------------------------------------------------
76
77 ### init.d based systems (ie CentOS 6):
78
79 1. Enable the daemons as needed to run after boot (Zebra is mandatory)
80
81 chkconfig zebra on
82 chkconfig ospfd on
83 chkconfig ospf6d on
84 chkconfig bgpd on
85 ... etc
86
87 2. If you want to run `watchfrr`, then configure `/etc/sysconfig/frr`
88 and uncomment the line with the daemons for `watchfrr` to monitor,
89 then enable watchfrr
90
91 chkconfig watchfrr on
92
93 3. Check your firewall / IPtables to make sure the routing protocols are
94 allowed.
95
96 4. Start the daemons (or reboot)
97
98 service zebra start
99 service bgpd start
100 service ospfd start
101 ... etc
102
103 Configuration is stored in `/etc/frr/*.conf` files.
104
105
106 ### systemd based systems (ie CentOS 7, Fedora 22)
107
108 1. Enable the daemons as needed to run after boot (Zebra is mandatory)
109
110 systemctl enable zebra
111 systemctl enable ospfd
112 systemctl enable ospf6d
113 systemctl enable bgpd
114 ... etc
115
116 Note: There is no watchfrr on systemd based systems. Systemd contains
117 the functionality of monitoring and restarting daemons.
118
119 2. Check your firewall / IPtables to make sure the routing protocols are
120 allowed.
121
122 3. Start the daemons (or reboot)
123
124 systemctl start zebra
125 systemctl start bgpd
126 systemctl start ospfd
127 ... etc
128
129 Configuration is stored in `/etc/frr/*.conf` files.
130