安装FRRouting

 http://docs.frrouting.org/projects/dev-guide/en/latest/building-frr-for-centos7.html

 

CentOs7 :
git clone https://github.com/frrouting/frr.git frr

在执行make check的时候会有报错,认为可能有人提交了新的修改导致当前版本不可用,又重新指定release版本的方式下载安装代码。
git clone -b stable/6.0 https://github.com/frrouting/frr.git frr

安装json

yum install json-c json-c-devel

安装python

yum install epel-release
yum install python34
注意:上面的安装方法并未安装pip和setuptools,如果你要安装这两个库可以使用下面的命令:

curl -O https://bootstrap.pypa.io/get-pip.py
/usr/bin/python3.4 get-pip.py 

ln -sf /usr/bin/python3.4 /usr/bin/python


 

 

2、 一键安装解决依赖 

 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

 yum -y install cmake

 

安装yang

cd libyang
mkdir build; cd build
cmake -DENABLE_LYD_PRIV=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr \
      -D CMAKE_BUILD_TYPE:String="Release" ..
make
sudo make install

 

配置用户组

[root@host-10-10-18-195 yang]# vim frr.sh
groupadd -g 92 frr
groupadd -r -g 85 frrvty
useradd -u 92 -g 92 -M -r -G frrvty -s /sbin/nologin \
  -c "FRR FRRouting suite" -d /var/run/frr frr

[root@host-10-10-18-195 yang]# bash frr.sh
groupadd: group 'frr' already exists
groupadd: GID '85' already exists
useradd: group 'frrvty' does not exist

配置

git clone https://github.com/frrouting/frr.git frr cd frr ./bootstrap.sh ./configure \ --bindir=/usr/bin \ --sbindir=/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/bin/sphinx-build

 make make check sudo make install


[root@host-10-10-18-195 frr-stable-7.3]# install -p -m 644 tools/etc/frr/daemons /etc/frr/
[root@host-10-10-18-195 frr-stable-7.3]# chown frr:frr /etc/frr/daemons
[root@host-10-10-18-195 frr-stable-7.3]# 

[root@host-10-10-18-195 frr-stable-7.3]# touch /etc/sysctl.d/90-routing-sysctl.conf

[root@host-10-10-18-195 frr-stable-7.3]# vim /etc/sysctl.d/90-routing-sysctl.conf
# Sysctl for routing
# #
# # Routing: We need to forward packets
net.ipv4.conf.all.forwarding=1
net.ipv6.conf.all.forwarding=1

[root@host-10-10-18-195 frr-stable-7.3]# sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
net.ipv4.conf.all.forwarding = 1
net.ipv6.conf.all.forwarding = 1

[root@host-10-10-18-195 frr-stable-7.3]# install -p -m 644 tools/frr.service /usr/lib/systemd/system/frr.service
[root@host-10-10-18-195 frr-stable-7.3]# systemctl preset frr.service
[root@host-10-10-18-195 frr-stable-7.3]# systemctl enable frr
Created symlink from /etc/systemd/system/multi-user.target.wants/frr.service to /usr/lib/systemd/system/frr.service.
关掉quagga
[root@host-10-10-18-195 frr-stable-7.3]# service bgpd stop
Redirecting to /bin/systemctl stop bgpd.service
[root@host-10-10-18-195 frr-stable-7.3]# service zebra stop
Redirecting to /bin/systemctl stop zebra.service

猜你喜欢

转载自www.cnblogs.com/dream397/p/12327489.html