Revert "CMake: Fix Windows help install target"
[metze/wireshark/wip.git] / README.bsd
1 Installing Wireshark on FreeBSD/OpenBSD/NetBSD/DragonFly BSD
2 ========================================================================
3
4      1. Extra packages required
5      2. Compiling Wireshark
6      3. Berkeley Packet Filter (BPF) requirement
7      4. Running Wireshark as a non-root user
8
9
10 1. Extra packages required
11 ---------------------------
12 Wireshark requires a number of additional programs to function.
13 Install the latest versions of the following programs before compiling:
14
15 The easiest way to install these is by using your operating system's
16 ports or packages system.  If you prefer to build from source, the programs
17 can be found at the following sites:
18
19     glib 2.32 or later:
20          ftp.gnome.org:/pub/gnome/sources/glib/
21          http://ftp.gnome.org/pub/gnome/sources/glib/
22
23     pkgconfig:
24          http://pkgconfig.freedesktop.org/releases/
25
26     python 3.4 or later:
27          https://www.python.org/downloads/source/
28
29 If you want to use the Wireshark GUI, install one or both of these toolkits:
30
31     Qt 5.2 or later:
32          http://download.qt-project.org/official_releases/qt/
33
34
35 (These programs may require additional dependencies)
36
37 Additional programs can be used to enhance Wireshark's functionality.
38 These can be found by typing ./configure --help or looking at the output
39 at the end of running the configure script.
40
41
42 2. Compiling Wireshark
43 -----------------------
44 To compile Wireshark with the default options, run configure, make and
45 make install (you may have to run "autogen.sh" first):
46
47      ./configure
48      make
49      make install
50
51 The configure and make steps can be run as a non-root user and you can
52 run Wireshark from the compilation directory itself.  You must run make
53 install as root in order to copy the program to the proper directories.
54
55
56 3. Berkeley Packet Filter (BPF) requirement
57 --------------------------------------------
58 In order to capture packets (with Wireshark/TShark, tcpdump, or any
59 other packet capture program) on a BSD system, your kernel must have the
60 Berkeley Packet Filter mechanism enabled.  The default kernel
61 configurations in recent versions of BSD systems have this enabled
62 already.  To verify the bpf device is present, look in the /dev
63 directory:
64
65     ls -l /dev/bpf*
66
67 You should see one or more bpf devices listed similar to this:
68
69     crw-------  1 root  wheel    0,  90 Aug 10 21:05 /dev/bpf0
70     crw-------  1 root  wheel    0,  91 Aug 10 21:05 /dev/bpf1
71
72 Packet-capturing programs will pick the first bpf device that's not in
73 use.  Recent versions of most BSDs will create bpf devices as needed, so
74 you don't have to configure the number of devices that will be
75 available.
76
77 4. Running wireshark as a non-root user
78 -------------------------------------------
79 Since the bpf devices are read-only by the owner (root), you normally
80 have to run packet capturing programs such as Wireshark as root.  It is
81 safer to run programs as a non-root user if possible.  To run Wireshark
82 as a non-root user, you must change the permissions on the bpf device(s).
83 If you are the only user that needs to use Wireshark, the easiest way
84 is to change the owner of each bpf device to your username.  You can also
85 add the read/write ability to the group (typically wheel) and add users
86 that need to use Wireshark to the wheel group.  Check your operating
87 system's documentation on how to make permanent these changes as they
88 are often reset upon reboot; if /dev is implemented with devfs, it might
89 be possible to configure devfs to create all bpf devices owned by a
90 particular user and/or group and with particular permissions.  In
91 FreeBSD 6.0 and later this can be done by creating an /etc/devfs.rules
92 file with content such as
93
94         [localrules=10]
95         add path 'bpf*' {mode and permissions}
96
97 where "mode and permissions" can include clauses such as
98
99         mode {octal permissions}
100
101 to set the permissions on the device (e.g., "mode 0660" to set the
102 permissions to rw-rw-r--),
103
104         user {user}
105
106 to set the user who owns the device, or
107
108         group {group}
109
110 to set the group that owns the device and adding a line such as
111
112         devfs_system_ruleset=localrules
113
114 to /etc/rc.conf.  For example, an /etc/devfs.rules file with
115
116         [localrules=10]
117         add path 'bpf*' mode 0660 group wheel
118
119 will grant read and write permissions on all BPF devices to all users in
120 the "wheel" group.