root/trunk/smartmontools/INSTALL @ 3057

Revision 3057, 28.9 KB (checked in by chrfranke, 4 years ago)

smartd: Add option '-C, --capabilities' if libcap-ng is available
(ticket #45).

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