]> git.proxmox.com Git - mirror_frr.git/blame - doc/developer/building-frr-for-netbsd7.rst
doc: add libtool note
[mirror_frr.git] / doc / developer / building-frr-for-netbsd7.rst
CommitLineData
d1890d04 1NetBSD 7
278fb111
MW
2========================================
3
4NetBSD 7 restrictions:
5----------------------
6
d1890d04
QY
7- MPLS is not supported on ``NetBSD``. MPLS requires a Linux Kernel
8 (4.5 or higher). LDP can be built, but may have limited use without
9 MPLS
278fb111
MW
10
11Install required packages
12-------------------------
13
d1890d04
QY
14::
15
7d9a2e6d 16 sudo pkgin install git autoconf automake libtool gmake openssl \
b60f68ea 17 pkg-config json-c python27 py27-test python35 py-sphinx
278fb111
MW
18
19Install SSL Root Certificates (for git https access):
20
d1890d04
QY
21::
22
eb651bbc
MW
23 sudo pkgin install mozilla-rootcerts
24 sudo touch /etc/openssl/openssl.cnf
25 sudo mozilla-rootcerts install
278fb111
MW
26
27Select default Python and py.test
28
d1890d04
QY
29::
30
eb651bbc
MW
31 sudo ln -s /usr/pkg/bin/python2.7 /usr/bin/python
32 sudo ln -s /usr/pkg/bin/py.test-2.7 /usr/bin/py.test
278fb111 33
fc5a4adc
RW
34.. include:: building-libyang.rst
35
278fb111 36Get FRR, compile it and install it (from Git)
d1890d04
QY
37---------------------------------------------
38
39Add frr groups and user
75ca3b11 40^^^^^^^^^^^^^^^^^^^^^^^
278fb111 41
d1890d04 42::
278fb111 43
eb651bbc
MW
44 sudo groupadd -g 92 frr
45 sudo groupadd -g 93 frrvty
46 sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \
47 -d /nonexistent -s /sbin/nologin frr
278fb111 48
d1890d04 49Download Source, configure and compile it
75ca3b11 50^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
d1890d04 51
eb651bbc
MW
52(You may prefer different options on configure statement. These are just
53an example)
54
d1890d04
QY
55::
56
d6180888 57 git clone https://github.com/frrouting/frr.git frr
eb651bbc 58 cd frr
eb651bbc
MW
59 ./bootstrap.sh
60 MAKE=gmake
61 export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"
62 export CPPFLAGS="-I/usr/pkg/include"
63 ./configure \
64 --sysconfdir=/usr/pkg/etc/frr \
65 --enable-exampledir=/usr/pkg/share/examples/frr \
66 --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
67 --localstatedir=/var/run/frr \
eb651bbc
MW
68 --enable-multipath=64 \
69 --enable-user=frr \
70 --enable-group=frr \
71 --enable-vty-group=frrvty \
72 --enable-configfile-mask=0640 \
73 --enable-logfile-mask=0640 \
eb651bbc
MW
74 --enable-fpm \
75 --with-pkg-git-version \
76bd1499 76 --with-pkg-extra-version=-MyOwnFRRVersion
eb651bbc
MW
77 gmake
78 gmake check
79 sudo gmake install
278fb111 80
d1890d04 81Create empty FRR configuration files
75ca3b11 82^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
d1890d04
QY
83
84::
85
eb651bbc
MW
86 sudo mkdir /usr/pkg/etc/frr
87 sudo touch /usr/pkg/etc/frr/zebra.conf
88 sudo touch /usr/pkg/etc/frr/bgpd.conf
89 sudo touch /usr/pkg/etc/frr/ospfd.conf
90 sudo touch /usr/pkg/etc/frr/ospf6d.conf
91 sudo touch /usr/pkg/etc/frr/isisd.conf
92 sudo touch /usr/pkg/etc/frr/ripd.conf
93 sudo touch /usr/pkg/etc/frr/ripngd.conf
94 sudo touch /usr/pkg/etc/frr/pimd.conf
95 sudo chown -R frr:frr /usr/pkg/etc/frr
96 sudo touch /usr/local/etc/frr/vtysh.conf
97 sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf
98 sudo chmod 640 /usr/pkg/etc/frr/*.conf
278fb111 99
d1890d04 100Enable IP & IPv6 forwarding
75ca3b11 101^^^^^^^^^^^^^^^^^^^^^^^^^^^
d1890d04
QY
102
103Add the following lines to the end of ``/etc/sysctl.conf``:
278fb111 104
d1890d04 105::
278fb111 106
eb651bbc
MW
107 # Routing: We need to forward packets
108 net.inet.ip.forwarding=1
109 net.inet6.ip6.forwarding=1
278fb111 110
d1890d04
QY
111**Reboot** or use ``sysctl`` to apply the same config to the running
112system
113
114Install rc.d init files
75ca3b11 115^^^^^^^^^^^^^^^^^^^^^^^
d1890d04
QY
116
117::
278fb111 118
eb651bbc
MW
119 cp pkgsrc/*.sh /etc/rc.d/
120 chmod 555 /etc/rc.d/*.sh
278fb111 121
d1890d04 122Enable FRR processes
75ca3b11 123^^^^^^^^^^^^^^^^^^^^
d1890d04 124
278fb111
MW
125(Enable the required processes only)
126
d1890d04
QY
127::
128
eb651bbc
MW
129 echo "zebra=YES" >> /etc/rc.conf
130 echo "bgpd=YES" >> /etc/rc.conf
131 echo "ospfd=YES" >> /etc/rc.conf
132 echo "ospf6d=YES" >> /etc/rc.conf
133 echo "isisd=YES" >> /etc/rc.conf
134 echo "ripngd=YES" >> /etc/rc.conf
135 echo "ripd=YES" >> /etc/rc.conf
136 echo "pimd=YES" >> /etc/rc.conf