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