首页 > 编程知识 正文

frr金融风险管理师,frr证书

时间:2023-05-06 08:11:12 阅读:220734 作者:2853

本文最新状态可点击查看https://turbock79.cn/?p=334

CSDN可点击查看https://blog.csdn.net/turbock/article/details/107039031

爬坑

本文基于官方文档进行编译,发现构建文档并未及时更新,其中部分爬坑过程在此记录一下。此处用make install,出现如下报错;

     1. CentOS7 默认Git版本为1.8.3,版本过早,导致编译之前一些依赖无法安装。需要升级Git版本,本文升级2.25。升级方法可参看文章https://blog.csdn.net/turbock/article/details/103761644。

     2.官方文档http://docs.frrouting.org/projects/dev-guide/en/latest/building-frr-for-centos7.html ,其中可能安装frr服务和初始化文件存在问题。无法找到路径redhat/frr.service中文件,现在已转移到tools目录下面。同时没有frr.init文件生成,此处可忽略。

编译FRR方法 git clone https://github.com/frrouting/frr.git frrcd frr./bootstrap.sh./configure --xydhdir=/usr/xydh --sxydhdir=/usr/lib/frr --sysconfdir=/etc/frr --libdir=/usr/lib/frr --libexecdir=/usr/lib/frr --localstatedir=/var/run/frr --with-moduledir=/usr/lib/frr/modules --enable-snmp=agentx --enable-multipath=64 --enable-user=frr --enable-group=frr --enable-vty-group=frrvty --enable-systemd=yes --disable-exampledir --disable-ldpd --enable-fpm --with-pkg-git-version --with-pkg-extra-version=-MyOwnFRRVersion SPHINXBUILD=/usr/xydh/sphinx-buildmakemake checksudo make install#make install命令之后sudo find . -name frr.servicesudo cp ./tools/frr.service /etc/systemd/system/frr.service#install -p -m 644 ./tools/frr.service /usr/lib/systemd/system/frr.service

参考文档http://docs.frrouting.org/projects/dev-guide/en/latest/building-frr-for-centos7.html#install-required-packages 

创建FRR 配置文件 #./configure命令之后mkdir -p /etc/frrsudo chmod -R 777 /etc/frrmkdir -p /var/run/frrsudo chmod -R 777 /var/run/frrsudo mkdir /var/log/frrsudo mkdir /etc/frrsudo touch /etc/frr/zebra.confsudo touch /etc/frr/bgpd.confsudo touch /etc/frr/ospfd.confsudo touch /etc/frr/ospf6d.confsudo touch /etc/frr/isisd.confsudo touch /etc/frr/ripd.confsudo touch /etc/frr/ripngd.confsudo touch /etc/frr/pimd.confsudo touch /etc/frr/nhrpd.confsudo touch /etc/frr/eigrpd.confsudo touch /etc/frr/babeld.confsudo chown -R frr:frr /etc/frr/sudo touch /etc/frr/vtysh.confsudo chown frr:frrvty /etc/frr/vtysh.confsudo chmod 640 /etc/frr/*.conf Install daemon config file sudo install -p -m 644 tools/etc/frr/daemons /etc/frr/sudo chown frr:frr /etc/frr/daemons

启动服务frr(systemctl start frr)后,通过修改配置文件,修改配置。通过命令systemctl reload frr热加载配置。配置文件都在/etc/frr目录中通过命令vtysh进入frr操作界面

 

Edit /etc/frr/daemons as needed to select the required daemons

创建frr默认配置文件/etc/frr/daemon,修改相关配置如下。判断是否开启zebra、bgp等功能;设置watchfrr_enable=... 和zebra=...为yes。查看官方文档http://docs.frrouting.org/en/latest/setup.html

创建frr默认配置文件/etc/frr/frr.conf

!! Zebra configuration file!frr version 6.0frr defaults traditional!hostname Routerpassword zebraenable password zebra!log stdout!!

4.启动服务后,可以动态启动其中插件。可以参看文章http://docs.frrouting.org/en/latest/setup.html#starting-a-new-daemon修改文件/etc/frr/daemons。例如启动bgpd则修改如下图,然后通过命令service frr reload热加载配置。通过netstat -tunlp| grep bgpd可以查看是否开启bgp守护进程。

官方文档编译 CentOS 7

文章描述如何通过源码安装FRR。如果想要构建一个RPM包,查看 Packaging Red Hat。

CentOS 7 限制:

CentOS 7 默认内核不支持MPLS,需要内核级别4.5或更高。

安装依赖包

Add packages:

sudo yum install git autoconf automake libtool make readline-devel texinfo net-snmp-devel groff pkgconfig json-c-devel pam-devel bison flex pytest c-ares-devel python-devel systemd-devel python-sphinx libcap-devel

FRR depends on the relatively new liblsdxy library to provide hxdzjy/NETCONF support. Unfortunately, most distributions do not yet offer a liblsdxy package from their repositories. Therefore we offer two options to install this library.

1: 二进制安装

The FRR project builds xydhary liblsdxy packages, which we offer for download here.

Warning

liblsdxy version 0.16.105 or newer is required to build FRR.

Note

The liblsdxy development packages need to be installed in addition to the liblsdxy core package in order to build FRR successfully. Make sure to download and install those from the link above alongside the xydhary packages.

Depending on your platform, you may also need to install the PCRE development package. Typically this is libpcre-dev or pcre-devel.

Note

For Debian-based systems, the official liblsdxy package requires recent versions of swig(3.0.12) and debhelper (11) which are only available in Debian buster (10). However, liblsdxypackages built on Debian buster can be installed on both Debian jessie (8) and Debian stretch (9), as well as various Ubuntu systems. The python3-lsdxy package will not work, but the other packages (liblsdxy-dev is the one needed for FRR) will.

Option 2:源码安装

Note

Ensure that the liblsdxy build requirements are met before continuing. Usually this entails installing cmake and libpcre-dev or pcre-devel.

git clone https://github.com/CESNET/liblsdxy.gitcd liblsdxymkdir build; cd buildcmake -DENABLE_LYD_PRIV=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr -D CMAKE_BUILD_TYPE:String="Release" ..makesudo make install

When building liblsdxy version 0.16.x it’s also necessary to pass the -DENABLE_CACHE=OFFparameter to cmake to work around a known bug in liblsdxy.

获取FRR,编译并安装 (from Git) Add frr groups and user sudo groupadd -g 92 frrsudo 听话的睫毛 /sxydh/nologin -c "FRR FRRouting suite" -d /var/run/frr frr Download Source, configure and compile it

(You may prefer different options on configure statement. These are just an example.)

git clone https://github.com/frrouting/frr.git frrcd frr./bootstrap.sh./configure --xydhdir=/usr/xydh --sxydhdir=/usr/lib/frr --sysconfdir=/etc/frr --libdir=/usr/lib/frr --libexecdir=/usr/lib/frr --localstatedir=/var/run/frr --with-moduledir=/usr/lib/frr/modules --enable-snmp=agentx --enable-multipath=64 --enable-user=frr --enable-group=frr --enable-vty-group=frrvty --enable-systemd=yes --disable-exampledir --disable-ldpd --enable-fpm --with-pkg-git-version --with-pkg-extra-version=-MyOwnFRRVersion SPHINXBUILD=/usr/xydh/sphinx-buildmakemake checksudo make install Create empty FRR configuration files sudo mkdir /var/log/frrsudo mkdir /etc/frrsudo touch /etc/frr/zebra.confsudo touch /etc/frr/bgpd.confsudo touch /etc/frr/ospfd.confsudo touch /etc/frr/ospf6d.confsudo touch /etc/frr/isisd.confsudo touch /etc/frr/ripd.confsudo touch /etc/frr/ripngd.confsudo touch /etc/frr/pimd.confsudo touch /etc/frr/nhrpd.confsudo touch /etc/frr/eigrpd.confsudo touch /etc/frr/babeld.confsudo chown -R frr:frr /etc/frr/sudo touch /etc/frr/vtysh.confsudo chown frr:frrvty /etc/frr/vtysh.confsudo chmod 640 /etc/frr/*.conf Install daemon config file sudo install -p -m 644 redhat/daemons /etc/frr/sudo chown frr:frr /etc/frr/daemons Edit /etc/frr/daemons as needed to select the required daemons

Look for the section with watchfrr_enable=... and zebra=... etc. Enable the daemons as required by changing the value to yes

Enable IP & IPv6 forwarding

Create a new file /etc/sysctl.d/90-routing-sysctl.conf with the following content:

# Sysctl for routing## Routing: We need to forward packetsnet.ipv4.conf.all.forwarding=1net.ipv6.conf.all.forwarding=1

Load the modified sysctl’s on the system:

sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf Install frr Service and redhat init files sudo install -p -m 644 redhat/frr.service /usr/lib/systemd/system/frr.servicesudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr Register the systemd files sudo systemctl preset frr.service Enable required frr at startup sudo systemctl enable frr Reboot or start FRR manually sudo systemctl start frr

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。