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