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