-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathINSTALL
More file actions
210 lines (138 loc) · 6.76 KB
/
INSTALL
File metadata and controls
210 lines (138 loc) · 6.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
Quickstart
----------
To build Duc with its default options, run:
$ ./configure
$ make
$ sudo make install
Generate the configure script when it is not available (cloned git repo):
$ autoreconf -i
To get the required dependencies on Debian or Ubuntu, run:
$ sudo apt-get install libncursesw5-dev libcairo2-dev libpango1.0-dev \
build-essential libtkrzw-dev libzstd-dev
On Debian 11 (bullseye), you need to have the following line in your
/etc/apt/sources.list file:
deb http://deb.debian.org/debian bullseye-backports main
Then you would do:
$ sudo apt update
$ sudo apt-get install libncursesw5-dev libcairo2-dev libpango1.0-dev \
build-essential libtkrzw-dev tkrzw-doc tkrzw-utils libzstd-dev
On older RHEL or CentOS systems, you need to do:
$ sudo yum install pango-devel cairo-devel tokyocabinet-devel
RHEL 8 & 9 / Rockly Linux 8 & 9 / Alma Linux 8 & 9
Install epel-release & update
$ sudo yum install epel-release
$ sudo yum update
Install tkrzw and other required packages:
$ sudo yum install tkrzw tkrzw-devel tkrzw-doc tkrzw-libs pango-devel \
cairo-devel libzstd-devel
NOTE: for older deprecated backends you might need to install one
or more of the following:
tokyocabinet-devel lmdb-devel
Configuration Options
---------------------
Duc comes with support for various user interfaces and a number of
backends for database access and graph drawing. You can choose which
options should be used with the ./configure script to build Duc to fit
best in your environment.
This document describes the various options which can be passed to the
./configure script, and the impact these options have on Duc
functionality. But the ./configure --help is the definitive source.
User interfaces
---------------
Duc comes with the following user interfaces:
- Command line interface (duc ls): This user interface has no external
dependencies and is always enabled.
- Ncurses console interface (duc ui): an interactive console interface, which
depends on ncurses or ncursesw. This user interface is enabled by default. If
your system does not provide ncurses, you can disable this with
--disable-ui
- X11 GUI (duc gui): This is the default interface for Linux and other Unix
systems. This user interface depends on the cairo library (see below). If
your system has no X11 or cairo available, disable this user interface with:
--disable-x11
- OpenGL GUI (duc gui): an OpenGL/GLFW user interface which should be portable
on a large range of operating systems. The OpenGL gui is disabled by default.
If you want to enable OpenGL, run ./configure with:
--enable-opengl --disable-x11
Database backends
-----------------
As of v1.5.0, Duc has deprecated support of various key-value database backends:
- Tokyo Cabinet: tokyocabinet
- LevelDB: leveldb
- Sqlite3: sqlite3
- Lightning Memory-Mapped Database: lmdb
- Kyoto Cabinet: kyotocabinet
The default backend moving forward is the following:
- Tkrzw: tkrzw + zstd
since the performance is acceptable and it handles extremely large
databases of volumes with terabytes of storage and millions of files.
To help keep down the DB size, we also require zstd compression
library as well. And more importantly it's actually supported and
still developed.
--with-db-backend=ARG
If your system supports none of the above, contact the authors to see
if we can add your favourite backend, but we strongly urge you to look
at using Tkrzw.
Please note: Not all database formats can be shared between machines
with different architectures. Notably, Tokyo Cabinet is built with
non-standard options which breaks compatibility with other linux
distributions, even on the same architecture [1]. If you are planning
to share databases between different platforms (index machine A,
display on machine B) we recommend using the sqlite3 backend. Or
possibly tkrzw, but this is not tested. Reports welcome.
Note, Tokyo Cabinet, Kyoto Cabinet, LevelDB and LMDB are all being
deprecated from future versions of duc because the lack of development
and support for these libraries, especially for super large volumes to
be indexed.
1. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667979
When picking a backend you probably need to choose between speed, size
and robustness. Some (out of date) measurements on a system with a
372G directory containing 1.6M files:
----------------------------------
Database Run time Db size
(s) (kB)
----------------------------------
tokyocabinet 8.4 19.2
leveldb 7.1 31.5
sqlite3 13.5 71.1
lmdb 5.9 78.7
kyotocabinet 8.3 26.7
tkrzw [*] ??? ???
----------------------------------
[*] Tkrzw currently is the default used by Duc because of it's current
development, good compression and reasonable performance.
Tokyo Cabinet is not very stable and can create corrupt databases when
interrupting the indexing. If this is a problem for you, choose a
different db backend.
Graphics
--------
Duc supports various backends for creating graphics, but some have dependencies
which cannot be met on all systems. Especially on headless server systems or
embedded systems not all graphics libraries are available.
- SVG: Duc has native SVG support, which can be used by the 'duc graph' command
to create static images of disk usage. The SVG backend has no external
dependencies and is always enabled.
- HTML canvas: Duc has native support for generating graphs in HTML5 using
JavaScript and the canvas object. The HTML backend has not external
dependencies and is always enabled.
- Cairo/pango: The cairo/pango backend is required for the X11 user interface,
and also adds an option to the duc-graph command to generate images in .PNG
or .PDF file format. If your systems does not have cairo and pango available,
add the following flag to ./configure:
--disable-cairo
- OpenGL: Duc can draw to OpenGL contexts and can be used by the 'duc gui'
command. To enable the OpenGL backend for the 'duc gui' command, run
./configure with:
--enable-opengl --disable-x11
Testing
-------
Duc comes with a rudimentary test harness which can be run at the top
level directory with:
./test.sh
If you have valgrind and you want to run the tests using it do:
USE_VALGRIND=1 ./test.sh
It will complain if you try this and valgrind isn't installed. The
test harness still needs work and more tests, but should hopefully
help keep us from re-introducing bugs as they are fixed and checked
for. We would love to see more tests and a better harness, patches
welcome!