]>
Commit | Line | Data |
---|---|---|
c115e4a4 MW |
1 | Building your own FreeRangeRouting RPM |
2 | ====================================== | |
f755bf6d MW |
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 | ||
c115e4a4 | 13 | 2. Checkout FRR under a **unpriviledged** user account |
f755bf6d | 14 | |
c115e4a4 | 15 | git clone https://github.com/freerangerouting/frr.git frr |
f755bf6d MW |
16 | |
17 | 3. Run Bootstrap and make distribution tar.gz | |
18 | ||
c115e4a4 | 19 | cd frr |
f755bf6d MW |
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/ | |
c115e4a4 | 34 | cp frr*.tar.gz rpmbuild/SOURCES/ |
f755bf6d | 35 | |
c115e4a4 | 36 | 5. Edit rpm/SPECS/frr.spec with configuration as needed |
f755bf6d MW |
37 | Look at the beginning of the file and adjust the following parameters to enable |
38 | or disable features as required: | |
39 | ||
c115e4a4 | 40 | ################# frr configure options #################### |
f755bf6d MW |
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 } | |
b021388f RW |
55 | %{!?with_mpls: %global with_mpls 0 } |
56 | %{!?with_ldpd: %global with_ldpd 0 } | |
f755bf6d MW |
57 | %{!?with_shared: %global with_shared 1 } |
58 | %{!?with_multipath: %global with_multipath 64 } | |
c115e4a4 MW |
59 | %{!?frr_user: %global frr_user frr } |
60 | %{!?vty_group: %global vty_group frrvt } | |
f755bf6d | 61 | %{!?with_fpm: %global with_fpm 0 } |
c115e4a4 | 62 | %{!?with_watchfrr: %global with_watchfrr 1 } |
f755bf6d MW |
63 | |
64 | 6. Build the RPM | |
65 | ||
c115e4a4 | 66 | rpmbuild --define "_topdir `pwd`/rpmbuild" -ba rpmbuild/SPECS/frr.spec |
f755bf6d MW |
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 | ||
c115e4a4 | 87 | 2. If you want to run `watchfrr`, then configure `/etc/sysconfig/frr` |
9473e340 DS |
88 | and uncomment the line with the daemons for `watchfrr` to monitor, |
89 | then enable watchfrr | |
f755bf6d | 90 | |
9473e340 | 91 | chkconfig watchfrr on |
f755bf6d MW |
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 | ||
c115e4a4 | 103 | Configuration is stored in `/etc/frr/*.conf` files. |
f755bf6d MW |
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 | ||
9473e340 | 116 | Note: There is no watchfrr on systemd based systems. Systemd contains |
f755bf6d MW |
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 | ||
c115e4a4 | 129 | Configuration is stored in `/etc/frr/*.conf` files. |
f755bf6d | 130 |