]> git.proxmox.com Git - mirror_frr.git/blob - redhat/README.rpm_build.md
Merge pull request #1536 from opensourcerouting/isis-l2conv
[mirror_frr.git] / redhat / README.rpm_build.md
1 Building your own FRRouting RPM
2 ======================================
3 (Tested on CentOS 6, CentOS 7 and Fedora 24.)
4
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 build packages as documented in doc/Building_on_xxxxx.md
13 and the following additional packages:
14
15 yum install rpm-build net-snmp-devel pam-devel
16
17 Additionally, on systems with systemd (CentOS 7, Fedora)
18
19 yum install systemd-devel
20
21 (use `dnf install` on new Fedora instead of `yum install`)
22
23 3. Checkout FRR under a **unpriviledged** user account
24
25 git clone https://github.com/frrouting/frr.git frr
26
27 4. Run Bootstrap and make distribution tar.gz
28
29 cd frr
30 ./bootstrap.sh
31 ./configure --with-pkg-extra-version=-MyRPMVersion
32 make dist
33
34 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
35 mark your own unoffical build
36
37 5. Create RPM directory structure and populate with sources
38
39 mkdir rpmbuild
40 mkdir rpmbuild/SOURCES
41 mkdir rpmbuild/SPECS
42 cp redhat/*.spec rpmbuild/SPECS/
43 cp frr*.tar.gz rpmbuild/SOURCES/
44
45 6. Edit rpm/SPECS/frr.spec with configuration as needed
46 Look at the beginning of the file and adjust the following parameters to enable or disable features as required:
47
48 ############### FRRouting (FRR) configure options #################
49 # with-feature options
50 %{!?with_pam: %global with_pam 0 }
51 %{!?with_ospfclient: %global with_ospfclient 1 }
52 %{!?with_ospfapi: %global with_ospfapi 1 }
53 %{!?with_irdp: %global with_irdp 1 }
54 %{!?with_rtadv: %global with_rtadv 1 }
55 %{!?with_ldpd: %global with_ldpd 1 }
56 %{!?with_nhrpd: %global with_nhrpd 1 }
57 %{!?with_eigrp: %global with_eigrpd 1 }
58 %{!?with_shared: %global with_shared 1 }
59 %{!?with_multipath: %global with_multipath 256 }
60 %{!?frr_user: %global frr_user frr }
61 %{!?vty_group: %global vty_group frrvty }
62 %{!?with_fpm: %global with_fpm 0 }
63 %{!?with_watchfrr: %global with_watchfrr 1 }
64 %{!?with_bgp_vnc: %global with_bgp_vnc 0 }
65 %{!?with_pimd: %global with_pimd 1 }
66
67 7. Build the RPM
68
69 rpmbuild --define "_topdir `pwd`/rpmbuild" -ba rpmbuild/SPECS/frr.spec
70
71 DONE.
72
73 If all works correctly, then you should end up with the RPMs under
74 `rpmbuild/RPMS` and the Source RPM under `rpmbuild/SRPMS`
75
76
77 Enabling daemons after installation of the package:
78 ---------------------------------------------------
79
80 ### init.d based systems (ie CentOS 6):
81
82 1. Edit /etc/frr/daemons and enable required routing daemons (Zebra is probably needed for most deployments, so make sure to enable it.)
83
84 2. Enable the daemons as needed to run after boot (Zebra is mandatory)
85
86 chkconfig frr on
87
88 3. Check your firewall / IPtables to make sure the routing protocols are
89 allowed.
90
91 5. Start the FRR daemons (or reboot)
92
93 service frr start
94
95 Configuration is stored in `/etc/frr/*.conf` files and daemon selection is stored in `/etc/frr/daemons`.
96
97
98 ### systemd based systems (ie CentOS 7, Fedora 24)
99
100 1. Edit /etc/frr/daemons and enable required routing daemons (Zebra is probably needed for most deployments, so make sure to enable it.)
101
102 2. Enable the frr daemons to run after boot.
103
104 systemctl enable frr
105
106 2. Check your firewall / IPtables to make sure the routing protocols are
107 allowed.
108
109 3. Start the daemons (or reboot)
110
111 systemctl start frr
112
113 Configuration is stored in `/etc/frr/*.conf` files and daemon selection is stored in `/etc/frr/daemons`.
114