Switch to using syslog as the default logging mechanism, rather than the log file mechanism. Send SIGHUP to syslog (any process with syslog in the name) if they have files open in /var/log/frr/* (for debian, using lsof). For redhat, add sending HUP to any of the pids in /var/run/*syslog*pid, for /var/log/frr/frr.log Updated logrotate.d/frr to handle all the new daemons for debian; redhat already had them. Continue to send SIGUSR1 to all running frr daemons even when syslog is in use, in case logging has been switched from file to syslog or vice versa. For debian, accumulate all the PIDs and use a single kill command. Add /etc/rsyslogd.d/45-frr.conf to have all frr daemons (and tag frr) logs go to /var/log/frr/frr.log. If other syslog daemons are used, logs will go to default log file. Signed-off-by: Dave Olson <olson@cumulusnetworks.com> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| daemons | ||
| frr.init | ||
| frr.logrotate | ||
| frr.pam | ||
| frr.service | ||
| frr.spec.in | ||
| Makefile.am | ||
| README.rpm_build.md | ||
Building your own FRRouting RPM
(Tested on CentOS 6, CentOS 7 and Fedora 24.)
-
On CentOS 6 (which doesn't provide a bison/automake/autoconf of a recent enough version):
- Check out ../doc/Building_FRR_on_CentOS6.md for details on installing a bison/automake/autoconf to support frr building.
Newer automake/autoconf/bison is only needed to build the rpm and is not needed to install the binary rpm package
-
Install the following packages to build the RPMs:
yum install git autoconf automake libtool make gawk readline-devel \ texinfo net-snmp-devel groff pkgconfig rpm-build json-c-devel \ pam-devel texi2html bison libcap-devel flexAdditionally, on systems with systemd (CentOS 7, Fedora)
yum install systemd-devel(use
dnf installon new Fedora instead ofyum install)CentOS 6: Please check doc/Building_FRR_on_CentOS6.md for details on how to install required version of autoconf, automake and bison. The versions in the common Repo are too old.
-
Checkout FRR under a unpriviledged user account
git clone https://github.com/frrouting/frr.git frr -
Run Bootstrap and make distribution tar.gz
cd frr ./bootstrap.sh ./configure --with-pkg-extra-version=-MyRPMVersion make distNote: configure parameters are not important for the RPM building - except the
with-pkg-extra-versionif you want to give the RPM a specific name to mark your own unoffical build -
Create RPM directory structure and populate with sources
mkdir rpmbuild mkdir rpmbuild/SOURCES mkdir rpmbuild/SPECS cp redhat/*.spec rpmbuild/SPECS/ cp frr*.tar.gz rpmbuild/SOURCES/ -
Edit rpm/SPECS/frr.spec with configuration as needed Look at the beginning of the file and adjust the following parameters to enable or disable features as required:
############### FRRouting (FRR) configure options ################# # with-feature options %{!?with_tcp_zebra: %global with_tcp_zebra 0 } %{!?with_pam: %global with_pam 0 } %{!?with_ospfclient: %global with_ospfclient 1 } %{!?with_ospfapi: %global with_ospfapi 1 } %{!?with_irdp: %global with_irdp 1 } %{!?with_rtadv: %global with_rtadv 1 } %{!?with_ldpd: %global with_ldpd 1 } %{!?with_nhrpd: %global with_nhrpd 1 } %{!?with_eigrp: %global with_eigrpd 1 } %{!?with_shared: %global with_shared 1 } %{!?with_multipath: %global with_multipath 256 } %{!?frr_user: %global frr_user frr } %{!?vty_group: %global vty_group frrvty } %{!?with_fpm: %global with_fpm 0 } %{!?with_watchfrr: %global with_watchfrr 1 } %{!?with_bgp_vnc: %global with_bgp_vnc 0 } %{!?with_pimd: %global with_pimd 1 } -
Build the RPM
rpmbuild --define "_topdir `pwd`/rpmbuild" -ba rpmbuild/SPECS/frr.spec
DONE.
If all works correctly, then you should end up with the RPMs under
rpmbuild/RPMS and the Source RPM under rpmbuild/SRPMS
Enabling daemons after installation of the package:
init.d based systems (ie CentOS 6):
-
Edit /etc/frr/daemons and enable required routing daemons (Zebra is probably needed for most deployments, so make sure to enable it.)
-
Enable the daemons as needed to run after boot (Zebra is mandatory)
chkconfig frr on -
Check your firewall / IPtables to make sure the routing protocols are allowed.
-
Start the FRR daemons (or reboot)
service frr start
Configuration is stored in /etc/frr/*.conf files and daemon selection is stored in /etc/frr/daemons.
systemd based systems (ie CentOS 7, Fedora 24)
-
Edit /etc/frr/daemons and enable required routing daemons (Zebra is probably needed for most deployments, so make sure to enable it.)
-
Enable the frr daemons to run after boot.
systemctl enable frr -
Check your firewall / IPtables to make sure the routing protocols are allowed.
-
Start the daemons (or reboot)
systemctl start frr
Configuration is stored in /etc/frr/*.conf files and daemon selection is stored in /etc/frr/daemons.