]>
Commit | Line | Data |
---|---|---|
447a8fe9 | 1 | Building your own FRRouting RPM |
c115e4a4 | 2 | ====================================== |
c4342d27 | 3 | (Tested on CentOS 6, CentOS 7 and Fedora 24.) |
f755bf6d | 4 | |
cf53d413 MW |
5 | 1. On CentOS 6 (which doesn't provide a bison/automake/autoconf of a recent enough version): |
6 | - Check out ../doc/Building_FRR_on_CentOS6.md for details on installing | |
7 | a bison/automake/autoconf to support frr building. | |
8 | ||
9 | Newer automake/autoconf/bison is only needed to build the rpm and is | |
10 | **not** needed to install the binary rpm package | |
11 | ||
12 | 2. Install the following packages to build the RPMs: | |
f755bf6d | 13 | |
826d8bef | 14 | yum install git autoconf automake libtool make gawk readline-devel \ |
cf53d413 | 15 | texinfo net-snmp-devel groff pkgconfig rpm-build json-c-devel pam-devel texi2html bison |
d75d3b87 MW |
16 | |
17 | Additionally, on systems with systemd (CentOS 7, Fedora) | |
18 | ||
19 | yum install systemd-devel | |
f755bf6d | 20 | |
826d8bef | 21 | (use `dnf install` on new Fedora instead of `yum install`) |
d75d3b87 MW |
22 | |
23 | **CentOS 6:** Please check doc/Building_FRR_on_CentOS6.md for details on | |
24 | how to install required version of autoconf, automake and bison. The | |
25 | versions in the common Repo are too old. | |
26 | ||
cf53d413 | 27 | 3. Checkout FRR under a **unpriviledged** user account |
f755bf6d | 28 | |
826d8bef | 29 | git clone https://github.com/frrouting/frr.git frr |
f755bf6d | 30 | |
cf53d413 | 31 | 4. Run Bootstrap and make distribution tar.gz |
f755bf6d | 32 | |
826d8bef MW |
33 | cd frr |
34 | ./bootstrap.sh | |
35 | ./configure --with-pkg-extra-version=-MyRPMVersion | |
36 | make dist | |
37 | ||
38 | 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 | |
39 | mark your own unoffical build | |
f755bf6d | 40 | |
cf53d413 | 41 | 5. Create RPM directory structure and populate with sources |
f755bf6d | 42 | |
826d8bef MW |
43 | mkdir rpmbuild |
44 | mkdir rpmbuild/SOURCES | |
45 | mkdir rpmbuild/SPECS | |
46 | cp redhat/*.spec rpmbuild/SPECS/ | |
47 | cp frr*.tar.gz rpmbuild/SOURCES/ | |
f755bf6d | 48 | |
cf53d413 | 49 | 6. Edit rpm/SPECS/frr.spec with configuration as needed |
826d8bef MW |
50 | Look at the beginning of the file and adjust the following parameters to enable or disable features as required: |
51 | ||
cf53d413 | 52 | ############### FRRouting (FRR) configure options ################# |
826d8bef | 53 | # with-feature options |
cf53d413 MW |
54 | %{!?with_tcp_zebra: %global with_tcp_zebra 0 } |
55 | %{!?with_pam: %global with_pam 0 } | |
56 | %{!?with_ospfclient: %global with_ospfclient 1 } | |
57 | %{!?with_ospfapi: %global with_ospfapi 1 } | |
58 | %{!?with_irdp: %global with_irdp 1 } | |
59 | %{!?with_rtadv: %global with_rtadv 1 } | |
60 | %{!?with_ldpd: %global with_ldpd 1 } | |
61 | %{!?with_shared: %global with_shared 1 } | |
62 | %{!?with_multipath: %global with_multipath 256 } | |
63 | %{!?frr_user: %global frr_user frr } | |
64 | %{!?vty_group: %global vty_group frrvty } | |
65 | %{!?with_fpm: %global with_fpm 0 } | |
66 | %{!?with_watchfrr: %global with_watchfrr 1 } | |
67 | %{!?with_bgp_vnc: %global with_bgp_vnc 0 } | |
68 | %{!?with_pimd: %global with_pimd 1 } | |
69 | ||
70 | 7. Build the RPM | |
f755bf6d | 71 | |
826d8bef | 72 | rpmbuild --define "_topdir `pwd`/rpmbuild" -ba rpmbuild/SPECS/frr.spec |
f755bf6d MW |
73 | |
74 | DONE. | |
75 | ||
826d8bef MW |
76 | If all works correctly, then you should end up with the RPMs under |
77 | `rpmbuild/RPMS` and the Source RPM under `rpmbuild/SRPMS` | |
f755bf6d MW |
78 | |
79 | ||
80 | Enabling daemons after installation of the package: | |
81 | --------------------------------------------------- | |
82 | ||
83 | ### init.d based systems (ie CentOS 6): | |
84 | ||
c4342d27 | 85 | 1. Edit /etc/frr/daemons and enable required routing daemons (Zebra is probably needed for most deployments, so make sure to enable it.) |
f755bf6d | 86 | |
c4342d27 MW |
87 | 2. Enable the daemons as needed to run after boot (Zebra is mandatory) |
88 | ||
89 | chkconfig frr on | |
f755bf6d MW |
90 | |
91 | 3. Check your firewall / IPtables to make sure the routing protocols are | |
92 | allowed. | |
826d8bef | 93 | |
c4342d27 | 94 | 5. Start the FRR daemons (or reboot) |
f755bf6d | 95 | |
c4342d27 | 96 | service frr start |
826d8bef | 97 | |
c4342d27 | 98 | Configuration is stored in `/etc/frr/*.conf` files and daemon selection is stored in `/etc/frr/daemons`. |
f755bf6d MW |
99 | |
100 | ||
c4342d27 | 101 | ### systemd based systems (ie CentOS 7, Fedora 24) |
f755bf6d | 102 | |
c4342d27 MW |
103 | 1. Edit /etc/frr/daemons and enable required routing daemons (Zebra is probably needed for most deployments, so make sure to enable it.) |
104 | ||
105 | 2. Enable the frr daemons to run after boot. | |
826d8bef | 106 | |
c4342d27 | 107 | systemctl enable frr |
f755bf6d MW |
108 | |
109 | 2. Check your firewall / IPtables to make sure the routing protocols are | |
110 | allowed. | |
826d8bef | 111 | |
f755bf6d MW |
112 | 3. Start the daemons (or reboot) |
113 | ||
c4342d27 | 114 | systemctl start frr |
826d8bef | 115 | |
c4342d27 | 116 | Configuration is stored in `/etc/frr/*.conf` files and daemon selection is stored in `/etc/frr/daemons`. |
f755bf6d | 117 |