]> git.proxmox.com Git - mirror_frr.git/blame - redhat/README.rpm_build.md
Merge remote-tracking branch 'origin/master' into cm16615
[mirror_frr.git] / redhat / README.rpm_build.md
CommitLineData
447a8fe9 1Building your own FRRouting RPM
c115e4a4 2======================================
3630ef2d 3(Tested on CentOS 6, CentOS 7 and Fedora 24.)
f755bf6d 4
f9e0332e
MW
51. 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
122. Install the following packages to build the RPMs:
f755bf6d 13
94c00335 14 yum install git autoconf automake libtool make gawk readline-devel \
b3dfccc8
MW
15 texinfo net-snmp-devel groff pkgconfig rpm-build json-c-devel \
16 pam-devel texi2html bison libcap-devel flex
58f20b90
MW
17
18 Additionally, on systems with systemd (CentOS 7, Fedora)
19
20 yum install systemd-devel
f755bf6d 21
94c00335 22 (use `dnf install` on new Fedora instead of `yum install`)
58f20b90
MW
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
f9e0332e 283. Checkout FRR under a **unpriviledged** user account
f755bf6d 29
94c00335 30 git clone https://github.com/frrouting/frr.git frr
f755bf6d 31
f9e0332e 324. Run Bootstrap and make distribution tar.gz
f755bf6d 33
94c00335
MW
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
f755bf6d 41
f9e0332e 425. Create RPM directory structure and populate with sources
f755bf6d 43
94c00335
MW
44 mkdir rpmbuild
45 mkdir rpmbuild/SOURCES
46 mkdir rpmbuild/SPECS
47 cp redhat/*.spec rpmbuild/SPECS/
48 cp frr*.tar.gz rpmbuild/SOURCES/
f755bf6d 49
f9e0332e 506. Edit rpm/SPECS/frr.spec with configuration as needed
94c00335
MW
51 Look at the beginning of the file and adjust the following parameters to enable or disable features as required:
52
f9e0332e 53 ############### FRRouting (FRR) configure options #################
94c00335 54 # with-feature options
f9e0332e
MW
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 }
5a76db68
MW
62 %{!?with_nhrpd: %global with_nhrpd 1 }
63 %{!?with_eigrp: %global with_eigrpd 1 }
f9e0332e
MW
64 %{!?with_shared: %global with_shared 1 }
65 %{!?with_multipath: %global with_multipath 256 }
66 %{!?frr_user: %global frr_user frr }
67 %{!?vty_group: %global vty_group frrvty }
68 %{!?with_fpm: %global with_fpm 0 }
69 %{!?with_watchfrr: %global with_watchfrr 1 }
70 %{!?with_bgp_vnc: %global with_bgp_vnc 0 }
71 %{!?with_pimd: %global with_pimd 1 }
72
737. Build the RPM
f755bf6d 74
94c00335 75 rpmbuild --define "_topdir `pwd`/rpmbuild" -ba rpmbuild/SPECS/frr.spec
f755bf6d
MW
76
77DONE.
78
94c00335
MW
79If all works correctly, then you should end up with the RPMs under
80`rpmbuild/RPMS` and the Source RPM under `rpmbuild/SRPMS`
f755bf6d
MW
81
82
83Enabling daemons after installation of the package:
84---------------------------------------------------
85
86### init.d based systems (ie CentOS 6):
87
3630ef2d 881. Edit /etc/frr/daemons and enable required routing daemons (Zebra is probably needed for most deployments, so make sure to enable it.)
f755bf6d 89
3630ef2d
MW
902. Enable the daemons as needed to run after boot (Zebra is mandatory)
91
92 chkconfig frr on
f755bf6d
MW
93
943. Check your firewall / IPtables to make sure the routing protocols are
95allowed.
94c00335 96
3630ef2d 975. Start the FRR daemons (or reboot)
f755bf6d 98
3630ef2d 99 service frr start
94c00335 100
3630ef2d 101Configuration is stored in `/etc/frr/*.conf` files and daemon selection is stored in `/etc/frr/daemons`.
f755bf6d
MW
102
103
3630ef2d 104### systemd based systems (ie CentOS 7, Fedora 24)
f755bf6d 105
3630ef2d
MW
1061. Edit /etc/frr/daemons and enable required routing daemons (Zebra is probably needed for most deployments, so make sure to enable it.)
107
1082. Enable the frr daemons to run after boot.
94c00335 109
3630ef2d 110 systemctl enable frr
f755bf6d
MW
111
1122. Check your firewall / IPtables to make sure the routing protocols are
113allowed.
94c00335 114
f755bf6d
MW
1153. Start the daemons (or reboot)
116
3630ef2d 117 systemctl start frr
94c00335 118
3630ef2d 119Configuration is stored in `/etc/frr/*.conf` files and daemon selection is stored in `/etc/frr/daemons`.
f755bf6d 120