5 `lldpd` supports several OS. You can install it from packages or from
6 sources. Once installed, you may want to look
7 [how to use and configure it]([[usage.html]]).
15 `lldpd` is already available in Debian and Ubuntu. You can install it
19 $ sudo apt-get install lldpd
20 Reading package lists... Done
21 Building dependency tree
22 Reading state information... Done
23 The following extra packages will be installed:
26 It will be installed and configured to start at boot. You can change
27 the options of `lldpd` in `/etc/default/lldpd`.
29 If the package is not recent enough, you can use the
30 [Debian backports][] on Debian. Follow the instructions available on
33 If it is still not recent enough, you can grab the appropriate Debian
34 package from [openSUSE Build Service][]. Follow the instructions
35 available on the website.
37 The last option is to to [build _lldpd_ from source][]. You can still
38 install and uninstall the package to get `_lldpd` user and group, as
39 well as a working init script.
43 `lldpd` is available in portage. Just issue the command `emerge lldpd`
44 to install it. You can also [build _lldpd_ from source][].
46 ## Fedora, RHEL, CentOS
48 `lldpd` is available from [EPEL][]. First, you need to install the
49 `epel-release` package, then just install with `yum install lldpd` or
50 `dnf install lldpd`. Once installed, you can change the options
51 provided to `lldpd` in `/etc/sysconfig/lldpd`.
53 Alternatively, you can install the packages
54 from [openSUSE Build Service][]. Follow the instructions available on
57 It is also possible to [build _lldpd_ from source][].
61 You can install the packages from [openSUSE Build Service][]. Follow
62 the instructions available on the website.
64 It is also possible to [build _lldpd_ from source][].
68 `lldpd` is currently available in the ports tree of most BSDs[^ports].
69 Follow the instructions on how to install lldpd from ports by following
70 the documentation specific to the respective ports tree.
72 Some BSDs provide up-to-date binary packages using their respective
73 package management tools.
75 Though if you want to [build _lldpd_ from source][]. You can add
76 `_lldpd` user with `vipw` and add `_lldpd` group by adding it manually
77 in `/etc/group`. The user must not be able to login, have its home as
78 `/var/empty` and a disabled shell (like `/bin/false`).
80 [^ports]: It has been added to the ports tree of OpenBSD (net/lldpd),
81 FreeBSD (net-mgmt/lldpd) and NetBSD's pkgsrc (net/lldpd).
82 DragonFly uses the FreeBSD port with an overlay named DeltaPorts.
84 You may want to configure `lldpd` with
85 `--with-privsep-chroot=/var/empty` to avoid to create
88 If `lldpcli` is not able to provide completion, you can use the `help`
89 command instead or install the GNU Readline library on your system.
93 The easiest way is to use the
94 [installer package for macOS][lastpkg]. You need at least macOSĀ
10.6.
96 Alternatively, you can use [Homebrew][]. Check the website if you
97 don't have it, it is easy to install. Once installed, type in a
101 $ brew install https://raw.github.com/vincentbernat/lldpd/master/osx/lldpd.rb
102 ########################################################################
100.0%
103 ==
> Downloading https://media.luffy.cx/files/lldpd/lldpd-{{ resource.meta.latestversion }}.tar.gz
104 ==
> ./configure --prefix=/usr/local/Cellar/lldpd/{{ resource.meta.latestversion }} --with-xml --with-readline
107 Pay attention at the instructions at the end of the build: they
108 explain how to create `_lldpd` user and group and how to run `lldpd`
109 when the system starts.
111 At least, you can [build _lldpd_ from source][].
113 # Install from source
115 This is the last resort method. Other methods are usually simpler.
117 You first need to download the latest version
118 ([{{ resource.meta.latestversion }}][lasttgz]) (do not download it
119 from GitHub, you would get an incomplete archive). You need a working
123 $ tar zxvf lldpd-{{ resource.meta.latestversion }}.tar.gz
124 $ cd lldpd-{{ resource.meta.latestversion }}
128 checking for a BSD-compatible install... /usr/bin/install -c
129 checking whether build environment is sane... yes
130 checking for a thread-safe mkdir -p... /bin/mkdir -p
131 checking for gawk... gawk
133 ------------------ Summary ------------------
134 lldpd version {{ meta.resource.latestversion }}
135 Prefix.........: /usr/local
136 C Compiler.....: gcc -g -O2 -fdiagnostics-show-option -std=gnu99 -pipe -Wall -W -Wextra -Wformat -Wformat-security -Wcast-align -Winline -fstack-protector -D_FORTIFY_SOURCE=
2 -Wdeclaration-after-statement -Wno-unused-parameter -Wno-sign-compare
137 Linker.........: /usr/bin/ld -m elf_x86_64 -Wl,-z,relro -Wl,-z,now
138 Libevent.......: system
149 ---------------------------------------------
151 Check the above options and compile with:
154 If this steps fail, feel free to [file a bug report][]. The content
155 of `config.log` should be helpful. Otherwise, check if everything is
156 as you except and continue.
164 make[
1]: Leaving directory `/home/bernat/src/lldpd-{{ resource.meta.latestversion }}'
166 If this steps fail, feel free to [file a bug report][] too with the
167 output and some details on your platform. The `config.log` is also
170 You can finish the installation with `make install`. Then, you still
171 have to complete the following steps by yourself. They are system
174 - Ensure the `liblldpctl` library is correctly registered with the
175 system. The output of `make install` should give the appropriate
176 steps. On Linux, this is `ldconfig -a`.
177 - Create a `_lldpd` user and a `_lldpd` group. This is needed for
178 privilege seperation (increased security).
179 - Create the chroot (`/usr/local/var/run/lldpd` by default). It is just an
181 - Ensure that `lldpd` is started at boot.
183 `../configure` accepts several options. You can get them with
184 `../configure --help`. The most interesting ones are `--with-snmp` and
187 [lasttgz]: https://media.luffy.cx/files/lldpd/lldpd-{{ resource.meta.latestversion }}.tar.gz
"lldpd {{ resource.meta.latestversion }} version"
188 [lastpkg]: https://media.luffy.cx/files/lldpd/lldpd-{{ resource.meta.latestversion }}.pkg
"lldpd {{ resource.meta.latestversion }} version for OSX"
189 [file a bug report]: https://github.com/vincentbernat/lldpd/issues
"GitHub bug tracker for lldpd"
190 [Debian backports]: https://backports.debian.org
"Debian Backports"
191 [openSUSE Build Service]: http://software.opensuse.org/download.html?project=home:vbernat&package=lldpd
"lldpd on OSC"
192 [build _lldpd_ from source]: #install-from-source
193 [Homebrew]: http://brew.sh/
"Homebrew: the missing package manager for macOS"
194 [EPEL]: https://fedoraproject.org/wiki/EPEL
"EPEL"
196 {# Local Variables: #}
198 {# indent-tabs-mode: nil #}