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