]> git.proxmox.com Git - mirror_smartmontools-debian.git/blame - INSTALL
Correct maintscript syntax
[mirror_smartmontools-debian.git] / INSTALL
CommitLineData
832b75ed
GG
1Smartmontools installation instructions
2=======================================
3
d2e702cf 4$Id: INSTALL 3935 2014-07-05 16:28:06Z chrfranke $
832b75ed
GG
5
6Please also see the smartmontools home page:
7http://smartmontools.sourceforge.net/
8
9Table of contents:
10
11[1] System requirements
2127e193 12[2] Installing from SVN
832b75ed
GG
13[3] Installing from source tarball
14[4] Guidelines for different Linux distributions
15[5] Guidelines for FreeBSD
16[6] Guidelines for Darwin
17[7] Guidelines for NetBSD
18[8] Guidelines for Solaris
19[9] Guidelines for Cygwin
20[10] Guidelines for Windows
21[11] Guidelines for OS/2, eComStation
22[12] Guidelines for OpenBSD
23[13] Comments
24[14] Detailed description of ./configure options
25
26[1] System requirements
27=======================
28
29 A) Linux
30
31 Any Linux distribution will support smartmontools if it has a
32 kernel version greater than or equal to 2.2.14. So any recent
33 Linux distribution should support smartmontools.
34
35 There are two parts of smartmontools that may require a patched or
36 nonstandard kernel:
37
38 (1) To get the ATA RETURN SMART STATUS command, the kernel needs
39 to support the HDIO_DRIVE_TASK ioctl().
40
41 (2) To run Selective Self-tests, the kernel needs to support the
42 HDIO_DRIVE_TASKFILE ioctl().
43
44 If your kernel does not support one or both of these ioctls, then
45 smartmontools will "mostly" work. The things that don't work will
46 give you harmless warning messages.
47
832b75ed
GG
48 For item (1) above, any 2.4 or 2.6 series kernel will provide
49 HDIO_DRIVE_TASK support. Some 2.2.20 and later kernels also
50 provide this support IF they're properly patched and
51 configured. [Andre Hedrick's IDE patches may be found at
cfbba5b9
GI
52 http://www.nic.funet.fi/pub/linux/kernel/people/hedrick/ide-2.2.20/
53 or are available from your local kernel.org mirror. They are not
832b75ed
GG
54 updated for 2.2.21 or later, and may contain a few bugs.].
55 If the configuration option CONFIG_IDE_TASK_IOCTL
56 exists in your 2.2.X kernel source code tree, then your 2.2.X
57 kernel will probably support this ioctl. [Note that this kernel
58 configuration option does NOT need to be enabled. Its presence
59 merely indicates that the required HDIO_DRIVE_TASK ioctl() is
60 supported.]
61
62 For item (2) above, your kernel must be configured with the kernel
63 configuration option CONFIG_IDE_TASKFILE_IO enabled. This
64 configuration option is present in all 2.4 and 2.6 series
65 kernels. Some 2.2.20 and later kernels also provide this support
66 IF they're properly patched and configured as described above.
67
68 Please see FAQ section of the URL above for additional details.
69
70 If you are using 3ware controllers, for full functionality you
71 must either use version 1.02.00.037 or greater of the 3w-xxxx
72 driver, or patch earlier 3ware 3w-xxxx drivers. See
73 http://smartmontools.sourceforge.net/3w-xxxx.txt
74 for the patch. The version 1.02.00.037 3w-xxxx.c driver was
75 incorporated into kernel 2.4.23-bk2 on 3 December 2003 and into
76 kernel 2.6.0-test5-bk11 on 23 September 2003.
77
78 B) FreeBSD
79
80 For FreeBSD support, a 5-current kernel that includes ATAng is
81 required in order to support ATA drives. Even current versions of
82 ATAng will not support 100% operation, as the SMART status can not
83 be reliably retrieved. There is patch pending approval of the
84 ATAng driver maintainer that will address this issue.
85
86 C) Solaris
87
88 The SCSI code has been tested on a variety of Solaris 8 and 9
89 systems. ATA/IDE code only works on SPARC platform. All tested
90 kernels worked correctly.
91
92 D) NetBSD/OpenBSD
93
94 The code was tested on a 1.6ZG (i.e., 1.6-current) system. It should
95 also function under 1.6.1 and later releases (unverified). Currently
96 it doesn't support ATA devices on 3ware RAID controllers.
97
98 E) Cygwin
99
ee38a438 100 The code was tested on Cygwin 1.7.15-1. It should also work on other
cfbba5b9 101 recent releases.
832b75ed
GG
102
103 Both Cygwin and Windows versions of smartmontools share the same code
104 to access the IDE/ATA or SCSI devices. The information in the "Windows"
105 section below also applies to the Cygwin version.
106
107 F) Windows
108
ee38a438
GI
109 The code was tested on Windows XP SP3, 2003, Vista, Windows 7 and
110 Windows 8 Release Preview. Support von Windows 9x/ME and NT4 was removed
111 after smartmontools 5.43.
832b75ed 112
bed94269
GI
113 ATA or SATA devices are supported if the device driver implements
114 the SMART IOCTLs or IOCTL_IDE_PASS_THROUGH or IOCTL_ATA_PASS_THROUGH.
ee38a438
GI
115 Only the latter provides full pass-through support which is needed
116 for all smartmontools features.
832b75ed 117
bed94269
GI
118 SCSI and USB devices are accessed through SPTI. Special driver support
119 is not required.
4d59bff9 120
bed94269 121 3ware 9000 RAID controllers are supported using features available
ba59cff1
GG
122 in the Windows driver release 9.4.0 (3wareDrv.sys 3.0.2.70) or later.
123 Older drivers provide SMART access to the first physical drive (port)
9ebc753d
GG
124 of each logical drive (unit). If driver support is not available
125 (7000/8000 series, 9000 on XP 64), smartctl can be used to parse SMART
126 data output from CLI or 3DM.
832b75ed
GG
127
128 G) MacOS/Darwin
129
130 The code was tested on MacOS 10.3.4. It should work from 10.3
131 forwards. It doesn't support 10.2.
132
4d59bff9
GG
133 It's important to know that on 10.3.x, some things don't work
134 (see WARNINGS): due to bugs in the libraries used, you cannot run
135 a short test or switch SMART support off on a drive; if you try,
136 you will just run an extended test or switch SMART support on. So
137 don't panic when your "short" test seems to be taking hours.
832b75ed
GG
138
139 It's also not possible at present to control when the offline
140 routine runs. If your drive doesn't have it running automatically by
141 default, you can't run it at all.
142
143 SCSI devices are not currently supported. Detecting the power
144 status of a drive is also not currently supported.
145
146 To summarize this, from another point of view, the things that
147 are not supported fall into two categories:
148
149 * Can't be implemented easily without more kernel-level support,
150 so far as I know:
151 - running immediate offline, conveyance, or selective tests
152 - running any test in captive mode
153 - aborting tests
154 - switching automatic offline testing on or off
155 - support for SCSI
156 - checking the power mode [-n Directive of smartd] (this is not
157 completely impossible, but not by using a documented API)
158
4d59bff9 159 * Work on 10.4 and later, but not on 10.3:
832b75ed
GG
160 - switching off SMART (switching *on* works fine)
161 - switching off auto-save (but why would you want to?)
162 - running the short test (that leaves you with only the extended test)
163
832b75ed
GG
164 However, some things do work well. For ATA devices, all the
165 informational output is available, unless you want something that only
4d59bff9
GG
166 an offline test updates. On many newer Mac OS systems, the
167 hard drive comes with the offline test switched on by default, so
168 even that works.
832b75ed 169
f4e463df
GI
170 The OS X SAT SMART Driver provides access to SMART data for SAT capable
171 USB and Firewire devices:
172 https://github.com/kasbert/OS-X-SAT-SMART-Driver
173 https://github.com/RJVB/OS-X-SAT-SMART-Driver
174 This does not require any smartctl -d TYPE option and should work also
175 with older smartmontools releases.
176
832b75ed
GG
177 H) OS/2, eComStation
178
179 The code was tested on eComStation 1.1, but it should work on all versions
180 of OS/2.
181 Innotek LibC 0.5 runtime is required.
182 Currently only ATA disks are supported, SCSI support will be added.
183
2127e193 184[2] Installing from SVN
832b75ed 185=======================
2127e193
GI
186
187 Get the sources from the SVN repository:
3d17a85c 188 svn co http://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools smartmontools
832b75ed
GG
189
190 Then type:
191 ./autogen.sh
192 and continue with step [3] below, skipping the "unpack the tarball" step.
193
832b75ed 194 The autogen.sh command is ONLY required when installing from
2127e193
GI
195 SVN. You need GNU Autoconf (version 2.50 or greater), GNU Automake
196 (version 1.7 or greater) and their dependencies installed in order
832b75ed 197 to run it. You can get these here:
cfbba5b9
GI
198 http://directory.fsf.org/project/autoconf/
199 http://directory.fsf.org/project/automake/
832b75ed
GG
200
201[3] Installing from the source tarball
202======================================
203
2127e193 204 If you are NOT installing from SVN, then unpack the tarball:
832b75ed
GG
205 tar zxvf smartmontools-5.VERSION.tar.gz
206
207 Then:
208 ./configure
209 make
210 make install (you may need to be root to do this)
211
212 As shown (with no options to ./configure) this defaults to the
cfbba5b9 213 following set of installation directories:
832b75ed
GG
214 --prefix=/usr/local
215 --sbindir=/usr/local/sbin
216 --sysconfdir=/usr/local/etc
217 --mandir=/usr/local/share/man
d008864d
GI
218 --docdir=/usr/local/share/doc/smartmontools
219 --with-exampledir=/usr/local/share/doc/smartmontools/examplescripts
cfbba5b9 220 --with-drivedbdir=/usr/local/share/smartmontools
d008864d
GI
221 --with-initscriptdir=auto
222 --with-systemdsystemunitdir=auto
cfbba5b9
GI
223 --enable-drivedb
224 --disable-attributelog
832b75ed 225 --disable-sample
cfbba5b9
GI
226 --disable-savestates
227 --with-libcap-ng=auto
228 --without-selinux
832b75ed
GG
229
230 These will usually not overwrite existing "distribution" installations on
231 Linux Systems since the FHS reserves this area for use by the system
232 administrator.
233
234 For different installation locations or distributions, simply add
235 arguments to ./configure as shown in [4] below.
236
cfbba5b9
GI
237 If you wish to alter the default C++ compiler flags, set an
238 environment variable CXXFLAGS='your options' before doing
832b75ed 239 ./configure, or else do:
cfbba5b9 240 make CXXFLAGS='your options'
832b75ed 241
2127e193
GI
242 The first output line of smartctl and smartd provides information
243 about release number, last SVN checkin date and revison, platform,
244 and package. The latter defaults to "(local build)" and can be
245 changed by the variable BUILD_INFO, for example:
246 make BUILD_INFO='"(Debian 5.39-2)"'
247
832b75ed
GG
248[4] Guidelines for different Linux distributions
249================================================
250
251Note: Please send corrections/additions to:
252smartmontools-support@lists.sourceforge.net
253
254Debian:
255 If you don't want to overwrite any distribution package, use:
256 ./configure
257
258Filesystem Hierarchy Standard (FHS, http://www.pathname.com/fhs/):
259 ./configure --sbindir=/usr/local/sbin \
260 --sysconfdir=/usr/local/etc \
261 --mandir=/usr/local/man \
d008864d
GI
262 --docdir=/usr/local/share/doc/smartmontools \
263 --with-initscriptdir=/usr/local/etc/init.d
832b75ed
GG
264
265Red Hat:
266 ./configure --sbindir=/usr/sbin \
cfbba5b9
GI
267 --sysconfdir=/etc \
268 --mandir=/usr/share/man \
d008864d
GI
269 --docdir=/usr/share/doc/smartmontools \
270 --with-initscriptdir=/etc/rc.d/init.d
832b75ed
GG
271
272Slackware:
273 If you don't want to overwrite any "distribution" package, use:
274 ./configure
275
276 Otherwise use:
277 ./configure --sbindir=/usr/sbin \
278 --sysconfdir=/etc \
279 --mandir=/usr/share/man \
d008864d
GI
280 --docdir=/usr/share/doc/smartmontools \
281 --with-initscriptdir=/etc/rc.d
832b75ed
GG
282
283 And
284 removepkg smartmontools smartsuite (only root can do this)
285 before make install
286
287 The init script works on Slackware. You just have to add an entry like
288 the following in /etc/rc.d/rc.M or /etc/rc.d/rc.local:
289
290 if [ -x /etc/rc.d/smartd ]; then
291 . /etc/rc.d/smartd start
292 fi
293
294 To disable it:
295 chmod 644 /etc/rc.d/smartd
296
297 For a list of options:
298 /etc/rc.d/smartd
299
300SuSE:
301 ./configure --sbindir=/usr/sbin \
302 --sysconfdir=/etc \
303 --mandir=/usr/share/man \
d008864d 304 --docdir=/usr/share/doc/packages/smartmontools-VERSION \
832b75ed 305 --with-initscriptdir=/etc/init.d \
832b75ed
GG
306
307[5] Guidelines for FreeBSD
308==========================
309 To match the way it will installed when it becomes available as a PORT, use
310 the following:
311
312 ./configure --prefix=/usr/local \
d008864d 313 --docdir=/usr/local/share/doc/smartmontools-VERSION \
832b75ed 314 --with-initscriptdir=/usr/local/etc/rc.d/ \
cfbba5b9 315 --enable-sample
832b75ed 316
832b75ed
GG
317 NOTE: --enable-sample will cause the smartd.conf and smartd RC files to
318 be installed with the string '.sample' append to the name, so you will end
319 up with the following:
cfbba5b9
GI
320 /usr/local/etc/smartd.conf.sample
321 /usr/local/etc/rc.d/smartd.sample
832b75ed
GG
322
323
324[6] Guidelines for Darwin
325=========================
326 ./configure --with-initscriptdir=/Library/StartupItems
327
4d59bff9
GG
328 If you'd like to build the i386 version on a powerpc machine, you can
329 use
330
a37e7145 331 CXX='g++ -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386' \
4d59bff9 332 ./configure --host=i386-apple-darwin \
cfbba5b9 333 --with-initscriptdir=/Library/StartupItems
832b75ed 334
d008864d
GI
335[7] Guidelines for NetBSD
336=========================
832b75ed 337 ./configure --prefix=/usr/pkg \
d008864d 338 --docdir=/usr/pkg/share/doc/smartmontools
832b75ed
GG
339
340[8] Guidelines for Solaris
341==========================
342
343 smartmontools has been partially but not completely ported to
344 Solaris. It includes complete SCSI support but no ATA or 3ware
2127e193
GI
345 support. It can be compiled with either CC (Sun's C++ compiler)
346 or GNU g++.
347
348 To compile with g++:
832b75ed
GG
349
350 ./configure [args]
351 make
352
2127e193 353 To compile with Sun CC:
832b75ed 354
2127e193 355 env CC=cc CXX=CC ./configure [args]
832b75ed
GG
356 make
357
358 The correct arguments [args] to configure are:
359 --sbindir=/usr/sbin \
360 --sysconfdir=/etc \
361 --mandir=/usr/share/man \
d008864d 362 --docdir=/usr/share/doc/smartmontools-VERSION \
832b75ed
GG
363 --with-initscriptdir=/etc/init.d
364
365 To start the script automatically on bootup, create hardlinks that
366 indicate when to start/stop in:
cfbba5b9 367 /etc/rc[S0123].d/
832b75ed 368 pointing to /etc/init.d/smartd. Create:
cfbba5b9
GI
369 K<knum>smartd in rcS.d, rc0.d, rc1.d, rc2.d
370 S<snum>smartd in rc3.d
832b75ed
GG
371 where <knum> is related to <snum> such that the higher snum is the
372 lower knum must be.
373
374 On usual configuration, '95' would be suitable for <snum> and '05'
375 for <knum> respectively. If you choose these value, you can
376 create hardlinks by:
377
378 cd /etc
379 sh -c 'for n in S 0 1 2; do ln init.d/smartd rc$n.d/K05smartd; done'
380 sh -c 'for n in 3 ; do ln init.d/smartd rc$n.d/S95smartd; done'
381
382[9] Guidelines for Cygwin
383=========================
384
385Same as Red Hat:
386 ./configure --prefix=/usr \
387 --sysconfdir=/etc \
388 --mandir='${prefix}/share/man'
389
390 OR EQUIVALENTLY
391 ./configure --sbindir=/usr/sbin \
392 --sysconfdir=/etc \
393 --mandir=/usr/share/man \
d008864d
GI
394 --docdir=/usr/share/doc/smartmontools \
395 --with-initscriptdir=/etc/rc.d/init.d
832b75ed
GG
396
397 Using DOS text file type as default for the working directories ("textmode"
398 mount option) is not recommended. Building the binaries and man pages using
399 "make" is possible, but "make dist" and related targets work only with UNIX
400 file type ("binmode" mount option) set. The "autogen.sh" script prints a
401 warning if DOS type is selected.
402
e165493d
GI
403 Files may also be checked out with a non-Cygwin SVN client which uses CR/LF
404 for svn:eol-style=native. The "autogen.sh" script has svn:eol-style=LF.
405 Bash option "-o igncr" is not required.
ba59cff1 406
832b75ed 407[10] Guidelines for Windows
eb07ddf2 408===========================
832b75ed 409
eb07ddf2 410To compile the Windows release with MinGW gcc on MSYS, use:
832b75ed 411
eb07ddf2 412 ./configure
832b75ed
GG
413 make
414
415 Instead of using "make install", copy the .exe files into
416 some directory in the PATH.
417
cfbba5b9 418Cross-compile statically linked 32-bit version with MinGW-w64:
eb07ddf2 419
7f0798ef 420 ./configure --build=$(./config.guess) \
cfbba5b9
GI
421 --host=i686-w64-mingw32 \
422 LDFLAGS=-static
eb07ddf2 423
cfbba5b9 424 Tested on Cygwin and Debian Linux.
eb07ddf2 425
cfbba5b9
GI
426Cross-compile statically linked 64-bit version with MinGW-w64:
427
428 ./configure --build=$(./config.guess) \
429 --host=x86_64-w64-mingw32 \
7f0798ef
GI
430 LDFLAGS=-static
431
cfbba5b9 432 Tested on Cygwin and Debian Linux with MinGW-w64 from
7f0798ef 433 http://mingw-w64.sourceforge.net/.
cfbba5b9 434
cfbba5b9
GI
435Cross-compile on Cygwin with old gcc-mingw 3.x:
436
437 ./configure --build=$(./config.guess) \
438 --host=i686-pc-mingw32 \
439 CC='gcc-3 -mno-cygwin' \
a7e8ffec
GI
440 CXX='g++-3 -mno-cygwin' \
441 CXXFLAGS='-g -O2 -Wall -W -Wno-format'
cfbba5b9
GI
442
443Cross-compile on Debian Linux with gcc-mingw32:
444
445 ./configure --build=$(./config.guess) \
446 --host=i586-mingw32msvc
eb07ddf2
GI
447
448
832b75ed
GG
449To build the Windows binary distribution, use:
450
451 make dist-win32
4d59bff9 452
832b75ed
GG
453 This builds the distribution in directory
454
455 ./smartmontools-VERSION.win32/
456
457 and packs it into
458
459 ./smartmontools-VERSION.win32.zip
460
4d59bff9
GG
461To create a Windows installer, use:
462
463 make installer-win32
464
465 This builds the distribution directory and packs it into the
466 self-extracting install program
467
468 ./smartmontools-VERSION.win32-setup.exe
469
470 The installer is build using the command "makensis" from the NSIS
471 package. See http://nsis.sourceforge.net/ for documentation and
2127e193 472 download location.
4d59bff9 473
7f0798ef
GI
474 It is also possible to (cross-)build the installer on Linux.
475 This was successfully tested on Debian with package "nsis".
476
f4e463df
GI
477To create a combined 32-/64-bit installer, use this in 32-bit build
478directory if 64-build directory is at ../build64:
479
480 make builddir_win64=../build64 installer_win32
481
4d59bff9
GG
482To both create and run the (interactive) installer, use:
483
484 make install-win32
485
832b75ed
GG
486 Additional make targets are distdir-win32 to build the directory
487 only and cleandist-win32 for cleanup.
488
489 The binary distribution includes all documentation files converted
490 to DOS text file format and *.html and *.txt preformatted man pages.
491 The tools unix2dos.exe (package cygutils) and zip.exe (package zip
492 or a native Win32 release of Info-ZIP, http://www.info-zip.org) are
493 necessary but may be not installed by Cygwin's default settings.
494
cfbba5b9
GI
495 The event message file tool syslogevt.exe (see smartd man page) is
496 included in the binary distribution if message compiler (windmc)
497 and resource compiler (windres) are available. This may be disabled
498 by passing 'WINDMC=no' to configure.
499
d008864d
GI
500To prepare os_win32 directory for MS Visual Studio C++ 2010 [Express],
501use the following on MSYS or Cygwin:
2127e193
GI
502
503 mkdir vctmp && cd vctmp
cfbba5b9 504 ../configure [... any MinGW option set from above ...]
d008864d 505 make config-vc10
832b75ed 506
ee38a438
GI
507 The MSVC project files (os_win32/vc10/*) are included in SVN (but not
508 in source tarball). The target config-vc10 from a Makefile configured
509 for MinGW creates os_win32/vc10/{config,svnversion}.h from
2127e193
GI
510 ./{config,svnversion}.h. The configure skript must be run outside
511 of the source directory to avoid inclusion of the original config.h.
832b75ed 512
832b75ed
GG
513
514[11] Guidelines for OS/2, eComStation
515=====================================
516
517To compile the OS/2 code, please run
518
519 ./os_os2/configure.os2
520 make
521 make install
522
523[12] Guidelines for OpenBSD
d008864d 524===========================
832b75ed
GG
525 To match the way it will installed when it becomes available as a PORT, use
526 the following:
527
528 ./configure --prefix=/usr/local \
d008864d
GI
529 --sysconfdir=/etc \
530 --docdir=/usr/local/share/doc/smartmontools-VERSION \
531 --without-initscriptdir \
cfbba5b9 532 --enable-sample
832b75ed 533
d008864d 534 NOTE: --enable-sample will cause the smartd.conf and smartd RC files to
832b75ed
GG
535 be installed with the string '.sample' append to the name, so you will end
536 up with the following:
d008864d 537 /etc/smartd.conf.sample
832b75ed
GG
538
539[13] Comments
540============
541
542To compile from another directory, you can replace the step
543 ./configure [options]
544by the following:
545 mkdir objdir
546 cd objdir
547 ../configure [options]
548
d008864d
GI
549Man pages contents is platform-specific by default. Info specific to other
550platforms may be not visible. To generate man pages with full contents use:
551
552 make os_man_filter=
553
832b75ed
GG
554To install to another destination (used mainly by package maintainers,
555or to examine the package contents without risk of modifying any
556system files) you can replace the step:
557 make install
558with:
559 make DESTDIR=/home/myself/smartmontools-package install
560
d008864d 561Use a full path. Paths like ./smartmontools-package may not work.
832b75ed
GG
562
563After installing smartmontools, you can read the man pages, and try
564out the commands:
565
566man smartd.conf
567man smartctl
568man smartd
569
570/usr/sbin/smartctl -s on -o on -S on /dev/hda (only root can do this)
571/usr/sbin/smartctl -a /dev/hda (only root can do this)
572
573Note that the default location for the manual pages are
574/usr/share/man/man5 and /usr/share/man/man8. If "man" doesn't find
575them, you may need to add /usr/share/man to your MANPATH environment
576variable.
577
cfbba5b9
GI
578Source and binary packages for Windows are available at
579http://sourceforge.net/projects/smartmontools/files/
832b75ed 580
d2e702cf
GI
581Refer to http://www.smartmontools.org/wiki/Download for any additional
582download and installation instructions.
832b75ed
GG
583
584The following files are installed if ./configure has no options:
585
832b75ed 586/usr/local/sbin/smartctl [Executable command-line utility]
cfbba5b9
GI
587/usr/local/sbin/smartd [Executable daemon]
588/usr/local/sbin/update-smart-drivedb [Drive database update script]
832b75ed
GG
589/usr/local/etc/smartd.conf [Configuration file for smartd daemon]
590/usr/local/etc/rc.d/init.d/smartd [Init/Startup script for smartd]
591/usr/local/share/man/man5/smartd.conf.5 [Manual page]
592/usr/local/share/man/man8/smartctl.8 [Manual page]
593/usr/local/share/man/man8/smartd.8 [Manual page]
cfbba5b9 594/usr/local/share/doc/smartmontools/AUTHORS [Information about the authors and developers]
ee38a438 595/usr/local/share/doc/smartmontools/ChangeLog [A log of changes. Also see SVN]
cfbba5b9
GI
596/usr/local/share/doc/smartmontools/COPYING [GNU General Public License Version 2]
597/usr/local/share/doc/smartmontools/INSTALL [Installation instructions: what you're reading!]
598/usr/local/share/doc/smartmontools/NEWS [Significant bugs discovered in old versions]
599/usr/local/share/doc/smartmontools/README [Overview]
600/usr/local/share/doc/smartmontools/TODO [Things that need to be done/fixed]
601/usr/local/share/doc/smartmontools/WARNINGS [Systems where lockups or other serious problems were reported]
602/usr/local/share/doc/smartmontools/smartd.conf [Example configuration file for smartd]
603/usr/local/share/doc/smartmontools/examplescripts/ [Executable scripts for -M exec of smartd.conf (4 files)]
604/usr/local/share/smartmontools/drivedb.h [Drive database]
605
606If /usr/local/etc/smartd.conf exists and differs from the
607default then the default configuration file is installed as
608/usr/local/etc/smartd.conf.sample instead.
832b75ed
GG
609
610The commands:
611
612make htmlman
613make txtman
614
615may be used to build .html and .txt preformatted man pages.
616These are used by the dist-win32 make target to build the Windows
617distribution.
618The commands also work on other operating system configurations
619if suitable versions of man2html, groff and grotty are installed.
620On systems without man2html, the following command should work
621if groff is available:
622
623make MAN2HTML='groff -man -Thtml' htmlman
624
625
2127e193
GI
626Some of the source files are prepared for the documentation
627generator Doxygen (http://www.doxygen.org/). If Doxygen is installed,
628the command:
629
630doxygen
631
632creates HTML documentation in doc/html and LaTeX documentation
633in doc/latex. If TeX is installed, the following command creates
634a documentation file doc/latex/refman.pdf:
635
636( cd doc/latex && make pdf )
637
638
832b75ed
GG
639[14] Detailed description of arguments to configure command
640===========================================================
641
642When you type:
643./configure [options]
644there are six particularly important variables that affect where the
645smartmontools software is installed. The variables are listed here,
646with their default values in square brackets, and the quantities that
647they affect described following that. This is a very wide table: please read
648it in a wide window.
649
650OPTIONS DEFAULT AFFECTS
651------- ------- -------
652--prefix /usr/local Please see below
653--sbindir ${prefix}/sbin Directory for smartd/smartctl executables;
654 Contents of smartd/smartctl man pages
a23d5117
GI
655--docdir ${prefix}/share/doc/smartmontools Location of the documentation
656 (autoconf >= 2.60 only, see also --with-docdir below)
832b75ed
GG
657--mandir ${prefix}/share/man Directory for smartctl/smartd/smartd.conf man pages
658--sysconfdir ${prefix}/etc Directory for smartd.conf;
659 Contents of smartd executable;
660 Contents of smartd/smartd.conf man pages;
661 Directory for rc.d/init.d/smartd init script
a7e8ffec
GI
662--with-initscriptdir auto Location of init scripts
663--with-systemdsystemunitdir auto Location of systemd service files
d2e702cf 664--with-systemdenvfile ${sysconfdir}/sysconfig/smartmontools Path of environment file for system service
a23d5117 665--with-docdir ${prefix}/share/doc/smartmontools Location of the documentation
cfbba5b9 666--with-exampledir ${docdir}/examplescripts Location of example scripts
2127e193
GI
667--enable-sample --disable-sample Adds the string '.sample' to the names of the smartd.conf file and the smartd RC file
668--with-os-deps os_<guessed>.o OS dependent module(s)
cfbba5b9 669--with-selinux --without-selinux Enables SELinux support. If smartmontools has to create the /dev/tw[ae] device
2127e193
GI
670 nodes for 3ware/AMCC controllers, this option ensures that the nodes are created
671 with correct SELinux file contexts.
cfbba5b9 672--with-libcap-ng --with-libcap-ng=auto Enables/disables libcap-ng support. If enabled and libcap-ng is
a23d5117 673 available, option --capabilities is added to smartd.
cfbba5b9 674--disable-drivedb --enable-drivedb Disables default drive database file '${drivedbdir}/drivedb.h'
bed94269 675--with-drivedbdir ${prefix}/share/smartmontools Directory for 'drivedb.h' (implies --enable-drivedb)
d2e702cf
GI
676--with-smartdscriptdir ${sysconfdir} Directory for 'smartd_warning.sh' script
677--with-smartdplugindir ${sysconfdir}/smartd_warning.d Directory for 'smartd_warning.sh' plugin scripts
2127e193 678--enable-savestates --disable-savestates Enables default smartd state files '${savestates}MODEL-SERIAL.ata.state'
bed94269
GI
679--with-savestates ${prefix}/var/lib/smartmontools/smartd. Prefix for smartd state files (implies --enable-savestates)
680--enable-attributelog --disable-attributelog Enables default smartd attribute log files
681--with-attributelog ${prefix}/var/lib/smartmontools/attrlog. Prefix for smartd attribute log files (implies --enable-attributelog)
d2e702cf 682--with-working-snprintf MinGW:guessed,others:yes Function snprintf() handles output truncation as specified by C99
832b75ed 683
a23d5117
GI
684Please note that in previous versions of smartmontools (<= 5.39) the
685default for --with-docdir was
686 ${prefix}/share/doc/smartmontools-VERSION
687This was changed to make it consistent with the default of the
688new --docdir option added in autoconf 2.60.
689
a7e8ffec
GI
690The defaults for --with-initscriptdir and --with-systemdsystemunitdir are
691guessed such that the following rules apply:
692- If --prefix=/usr --sysconfdir=/etc is specified, the guessed directories
693 should be the defaults used by the current OS or distribution.
694- If --sysconfdir=/etc is NOT specified, the guessed directories should
695 always be below ${prefix} or below ${sysconfdir}.
696
832b75ed
GG
697Here's an example:
698If you set --prefix=/home/joe and none of the other four
699variables then the different directories that are used would be:
700--sbindir /home/joe/sbin
a7e8ffec 701--docdir /home/joe/share/doc/smartmontools
832b75ed
GG
702--mandir /home/joe/share/man
703--sysconfdir /home/joe/etc
a7e8ffec
GI
704--with-exampledir /home/joe/share/doc/smartmontools/examplescripts
705--with-drivedbdir /home/joe/share/smartmontools
706--with-initscriptdir [see below]
707--with-systemdsystemunitdir [see below]
708
709If systemd is present (and pkg-config reports /lib/systemd/system
710as the systemdsystemunitdir):
711
712--with-initscriptdir [disabled]
713--with-systemdsystemunitdir /home/joe/lib/systemd/system
714
715else if /etc/rc.d/init.d exists:
716
717--with-initscriptdir /home/joe/etc/rc.d/init.d
718--with-systemdsystemunitdir [disabled]
719
720else if /etc/init.d exists:
721
722--with-initscriptdir /home/joe/etc/init.d
723--with-systemdsystemunitdir [disabled]
724
725else if /etc/rc.d exists:
726
727--with-initscriptdir /home/joe/etc/rc.d
728--with-systemdsystemunitdir [disabled]
729
730else
731
732--with-initscriptdir [disabled]
733--with-systemdsystemunitdir [disabled]
832b75ed
GG
734
735This is useful for test installs in a harmless subdirectory somewhere.
736
737Here are the four possible cases for the four variables above:
738
739Case 1:
740--prefix not set
741--variable not set
742===> VARIABLE gets default value above
743
744Case 2:
745--prefix set
746--variable not set
747===> VARIABLE gets PREFIX/ prepended to default value above
748
749Case 3:
750--prefix not set
751--variable set
752===> VARIABLE gets value that is set
753
754Case 4:
755--prefix is set
756--variable is set
757===> PREFIX is IGNORED, VARIABLE gets value that is set
758
759
760Here are the differences with and without --enable-sample, assuming
a7e8ffec
GI
761that initscript location is set and no other options specified
762(see above for details)
832b75ed
GG
763
764Case 1:
765--enable-sample provided
766==> Files installed are:
cfbba5b9
GI
767 /usr/local/etc/smartd.conf.sample
768 /usr/local/etc/rc.d/init.d/smartd.sample
832b75ed
GG
769
770Case 2:
771--disable-sample provided or parameter left out
772==> Files installed are:
cfbba5b9
GI
773 /usr/local/etc/smartd.conf
774 /usr/local/etc/rc.d/init.d/smartd
832b75ed
GG
775
776Additional information about using configure can be found here:
cfbba5b9 777http://www.gnu.org/software/autoconf/manual/autoconf.html#Running-configure-Scripts