]> git.proxmox.com Git - mirror_frr.git/blob - doc/developer/building-frr-for-ubuntu1204.rst
doc: add a community rule to permit usage of GPLv3
[mirror_frr.git] / doc / developer / building-frr-for-ubuntu1204.rst
1 Ubuntu 12.04LTS
2 ===============================================
3
4 - MPLS is not supported on ``Ubuntu 12.04`` with default kernel. MPLS
5 requires Linux Kernel 4.5 or higher (LDP can be built, but may have
6 limited use without MPLS) For an updated Ubuntu Kernel, see
7 http://kernel.ubuntu.com/~kernel-ppa/mainline/
8
9 Install required packages
10 -------------------------
11
12 Add packages:
13
14 ::
15
16 apt-get install \
17 git autoconf automake libtool make gawk libreadline-dev texinfo \
18 dejagnu pkg-config libpam0g-dev libjson0-dev flex python-pip \
19 libc-ares-dev python3-dev python3-sphinx install-info
20
21 Install newer bison from 14.04 package source (Ubuntu 12.04 package
22 source is too old)
23
24 ::
25
26 mkdir builddir
27 cd builddir
28 wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg-2.dsc
29 wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg.orig.tar.bz2
30 wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg-2.debian.tar.gz
31 tar -jxvf bison_3.0.2.dfsg.orig.tar.bz2
32 cd bison-3.0.2.dfsg/
33 tar xzf ../bison_3.0.2.dfsg-2.debian.tar.gz
34 sudo apt-get build-dep bison
35 debuild -b -uc -us
36 cd ..
37 sudo dpkg -i ./libbison-dev_3.0.2.dfsg-2_amd64.deb ./bison_3.0.2.dfsg-2_amd64.deb
38 cd ..
39 rm -rf builddir
40
41 Install newer version of autoconf and automake:
42
43 ::
44
45 wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
46 tar xvf autoconf-2.69.tar.gz
47 cd autoconf-2.69
48 ./configure --prefix=/usr
49 make
50 sudo make install
51 cd ..
52
53 wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
54 tar xvf automake-1.15.tar.gz
55 cd automake-1.15
56 ./configure --prefix=/usr
57 make
58 sudo make install
59 cd ..
60
61 Install pytest:
62
63 ::
64
65 pip install pytest
66
67 .. include:: building-libyang.rst
68
69 Get FRR, compile it and install it (from Git)
70 ---------------------------------------------
71
72 **This assumes you want to build and install FRR from source and not
73 using any packages**
74
75 Add frr groups and user
76 ^^^^^^^^^^^^^^^^^^^^^^^
77
78 ::
79
80 sudo groupadd -r -g 92 frr
81 sudo groupadd -r -g 85 frrvty
82 sudo adduser --system --ingroup frr --home /var/run/frr/ \
83 --gecos "FRR suite" --shell /sbin/nologin frr
84 sudo usermod -a -G frrvty frr
85
86 Download Source, configure and compile it
87 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88
89 (You may prefer different options on configure statement. These are just
90 an example.)
91
92 ::
93
94 git clone https://github.com/frrouting/frr.git frr
95 cd frr
96 ./bootstrap.sh
97 ./configure \
98 --prefix=/usr \
99 --enable-exampledir=/usr/share/doc/frr/examples/ \
100 --localstatedir=/var/run/frr \
101 --sbindir=/usr/lib/frr \
102 --sysconfdir=/etc/frr \
103 --enable-multipath=64 \
104 --enable-user=frr \
105 --enable-group=frr \
106 --enable-vty-group=frrvty \
107 --enable-configfile-mask=0640 \
108 --enable-logfile-mask=0640 \
109 --enable-fpm \
110 --with-pkg-git-version \
111 --with-pkg-extra-version=-MyOwnFRRVersion
112 make
113 make check
114 sudo make install
115
116 Create empty FRR configuration files
117 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
118
119 ::
120
121 sudo install -m 755 -o frr -g frr -d /var/log/frr
122 sudo install -m 775 -o frr -g frrvty -d /etc/frr
123 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf
124 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf
125 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf
126 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf
127 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf
128 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf
129 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf
130 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf
131 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf
132 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf
133 sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
134
135 Enable IP & IPv6 forwarding
136 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
137
138 Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
139 other settings)
140
141 ::
142
143 # Uncomment the next line to enable packet forwarding for IPv4
144 net.ipv4.ip_forward=1
145
146 # Uncomment the next line to enable packet forwarding for IPv6
147 # Enabling this option disables Stateless Address Autoconfiguration
148 # based on Router Advertisements for this host
149 net.ipv6.conf.all.forwarding=1
150
151 **Reboot** or use ``sysctl -p`` to apply the same config to the running
152 system
153
154 Install the init.d service
155 ^^^^^^^^^^^^^^^^^^^^^^^^^^
156
157 ::
158
159 sudo install -m 755 tools/frr /etc/init.d/frr
160 sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons
161 sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
162
163 Enable daemons
164 ^^^^^^^^^^^^^^
165
166 | Edit ``/etc/frr/daemons`` and change the value from "no" to "yes" for
167 those daemons you want to start by systemd.
168 | For example.
169
170 ::
171
172 zebra=yes
173 bgpd=yes
174 ospfd=yes
175 ospf6d=yes
176 ripd=yes
177 ripngd=yes
178 isisd=yes
179
180 Start the init.d service
181 ^^^^^^^^^^^^^^^^^^^^^^^^
182
183 - /etc/init.d/frr start
184 - use ``/etc/init.d/frr status`` to check its status.