Annotation of embedaddon/smartmontools/INSTALL, revision 1.1.1.3

1.1       misho       1: Smartmontools installation instructions
                      2: =======================================
                      3: 
1.1.1.3 ! misho       4: $Id: INSTALL 3713 2012-11-23 21:26:17Z chrfranke $
1.1       misho       5: 
                      6: Please also see the smartmontools home page:
                      7: http://smartmontools.sourceforge.net/
                      8: 
                      9: Table 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:     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
                     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
                     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: 
1.1.1.3 ! misho     100:     The code was tested on Cygwin 1.7.15-1.  It should also work on other
1.1       misho     101:     recent releases.
                    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: 
1.1.1.3 ! misho     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.
1.1       misho     112: 
                    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.
1.1.1.3 ! misho     115:     Only the latter provides full pass-through support which is needed
        !           116:     for all smartmontools features.
1.1       misho     117: 
                    118:     SCSI and USB devices are accessed through SPTI. Special driver support
                    119:     is not required.
                    120: 
                    121:     3ware 9000 RAID controllers are supported using features available
                    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)
                    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.
                    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: 
                    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.
                    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: 
                    159:    * Work on 10.4 and later, but not on 10.3:
                    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: 
                    164:     However, some things do work well.  For ATA devices, all the
                    165:     informational output is available, unless you want something that only
                    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.
                    169: 
1.1.1.2   misho     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: 
1.1       misho     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: 
                    184: [2] Installing from SVN
                    185: =======================
                    186: 
                    187:     Get the sources from the SVN repository:
                    188:     svn co https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk/smartmontools smartmontools
                    189: 
                    190:     Then type:
                    191:     ./autogen.sh
                    192:     and continue with step [3] below, skipping the "unpack the tarball" step.
                    193: 
                    194:     The autogen.sh command is ONLY required when installing from
                    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
                    197:     to run it.  You can get these here:
                    198:     http://directory.fsf.org/project/autoconf/
                    199:     http://directory.fsf.org/project/automake/
                    200: 
                    201: [3] Installing from the source tarball
                    202: ======================================
                    203: 
                    204:     If you are NOT installing from SVN, then unpack the tarball:
                    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
                    213:     following set of installation directories:
                    214:     --prefix=/usr/local
                    215:     --sbindir=/usr/local/sbin
                    216:     --sysconfdir=/usr/local/etc
                    217:     --mandir=/usr/local/share/man
                    218:     --docdir=/usr/local/share/doc/smartmontools
                    219:     --with-exampledir=/usr/local/share/doc/smartmontools/examplescripts
                    220:     --with-drivedbdir=/usr/local/share/smartmontools
                    221:     --with-initscriptdir=auto
                    222:     --with-systemdsystemunitdir=auto
                    223:     --enable-drivedb
                    224:     --disable-attributelog
                    225:     --disable-sample
                    226:     --disable-savestates
                    227:     --with-libcap-ng=auto
                    228:     --without-selinux
                    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: 
                    237:     If you wish to alter the default C++ compiler flags, set an
                    238:     environment variable CXXFLAGS='your options' before doing
                    239:     ./configure, or else do:
                    240:     make CXXFLAGS='your options'
                    241: 
                    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: 
                    248: [4] Guidelines for different Linux distributions
                    249: ================================================
                    250: 
                    251: Note: Please send corrections/additions to:
                    252: smartmontools-support@lists.sourceforge.net
                    253: 
                    254: Debian:
                    255:   If you don't want to overwrite any distribution package, use:
                    256:   ./configure
                    257: 
                    258: Filesystem Hierarchy Standard (FHS, http://www.pathname.com/fhs/):
                    259:   ./configure --sbindir=/usr/local/sbin                               \
                    260:               --sysconfdir=/usr/local/etc                             \
                    261:               --mandir=/usr/local/man                                 \
                    262:               --docdir=/usr/local/share/doc/smartmontools             \
                    263:               --with-initscriptdir=/usr/local/etc/init.d
                    264: 
                    265: Red Hat:
                    266:   ./configure --sbindir=/usr/sbin                               \
                    267:               --sysconfdir=/etc                                 \
                    268:               --mandir=/usr/share/man                           \
                    269:               --docdir=/usr/share/doc/smartmontools             \
                    270:               --with-initscriptdir=/etc/rc.d/init.d
                    271: 
                    272: Slackware:
                    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                           \
                    280:               --docdir=/usr/share/doc/smartmontools             \
                    281:               --with-initscriptdir=/etc/rc.d
                    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: 
                    300: SuSE:
                    301:   ./configure --sbindir=/usr/sbin                                        \
                    302:               --sysconfdir=/etc                                          \
                    303:               --mandir=/usr/share/man                                    \
                    304:               --docdir=/usr/share/doc/packages/smartmontools-VERSION     \
                    305:               --with-initscriptdir=/etc/init.d                           \
                    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                                      \
                    313:               --docdir=/usr/local/share/doc/smartmontools-VERSION      \
                    314:               --with-initscriptdir=/usr/local/etc/rc.d/                \
                    315:               --enable-sample
                    316: 
                    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:
                    320:         /usr/local/etc/smartd.conf.sample
                    321:         /usr/local/etc/rc.d/smartd.sample
                    322: 
                    323: 
                    324: [6] Guidelines for Darwin
                    325: =========================
                    326:   ./configure --with-initscriptdir=/Library/StartupItems
                    327: 
                    328:   If you'd like to build the i386 version on a powerpc machine, you can
                    329:   use
                    330: 
                    331:   CXX='g++ -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386' \
                    332:     ./configure --host=i386-apple-darwin \
                    333:                 --with-initscriptdir=/Library/StartupItems
                    334: 
                    335: [7] Guidelines for NetBSD
                    336: =========================
                    337:   ./configure --prefix=/usr/pkg                                       \
                    338:               --docdir=/usr/pkg/share/doc/smartmontools
                    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
                    345:     support.  It can be compiled with either CC (Sun's C++ compiler)
                    346:     or GNU g++.
                    347: 
                    348:     To compile with g++:
                    349: 
                    350:     ./configure [args]
                    351:     make
                    352: 
                    353:     To compile with Sun CC:
                    354: 
                    355:     env CC=cc CXX=CC ./configure [args]
                    356:     make
                    357: 
                    358:     The correct arguments [args] to configure are:
                    359:      --sbindir=/usr/sbin                                \
                    360:      --sysconfdir=/etc                                  \
                    361:      --mandir=/usr/share/man                            \
                    362:      --docdir=/usr/share/doc/smartmontools-VERSION      \
                    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:
                    367:                     /etc/rc[S0123].d/
                    368:     pointing to /etc/init.d/smartd. Create:
                    369:             K<knum>smartd in rcS.d, rc0.d, rc1.d, rc2.d
                    370:             S<snum>smartd in rc3.d
                    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: 
                    385: Same 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                           \
                    394:               --docdir=/usr/share/doc/smartmontools             \
                    395:               --with-initscriptdir=/etc/rc.d/init.d
                    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: 
1.1.1.2   misho     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.
1.1       misho     406: 
                    407: [10] Guidelines for Windows
                    408: ===========================
                    409: 
                    410: To compile the Windows release with MinGW gcc on MSYS, use:
                    411: 
                    412:   ./configure
                    413:   make
                    414: 
                    415:   Instead of using "make install", copy the .exe files into
                    416:   some directory in the PATH.
                    417: 
                    418: Cross-compile statically linked 32-bit version with MinGW-w64:
                    419: 
                    420:   ./configure --build=$(./config.guess) \
                    421:               --host=i686-w64-mingw32 \
                    422:               LDFLAGS=-static
                    423: 
                    424:   Tested on Cygwin and Debian Linux.
                    425: 
                    426: Cross-compile statically linked 64-bit version with MinGW-w64:
                    427: 
                    428:   ./configure --build=$(./config.guess) \
                    429:               --host=x86_64-w64-mingw32 \
                    430:               LDFLAGS=-static
                    431: 
                    432:   Tested on Cygwin and Debian Linux with MinGW-w64 from
                    433:   http://mingw-w64.sourceforge.net/.
                    434: 
                    435: Cross-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' \
                    440:               CXX='g++-3 -mno-cygwin' \
                    441:               CXXFLAGS='-g -O2 -Wall -W -Wno-format'
                    442: 
                    443: Cross-compile on Debian Linux with gcc-mingw32:
                    444: 
                    445:   ./configure --build=$(./config.guess) \
                    446:               --host=i586-mingw32msvc
                    447: 
                    448: 
                    449: To build the Windows binary distribution, use:
                    450: 
                    451:   make dist-win32
                    452: 
                    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: 
                    461: To 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
                    472:   download location.
                    473: 
                    474:   It is also possible to (cross-)build the installer on Linux.
                    475:   This was successfully tested on Debian with package "nsis".
                    476: 
1.1.1.2   misho     477: To create a combined 32-/64-bit installer, use this in 32-bit build
                    478: directory if 64-build directory is at ../build64:
                    479: 
                    480:   make builddir_win64=../build64 installer_win32
                    481: 
1.1       misho     482: To both create and run the (interactive) installer, use:
                    483: 
                    484:   make install-win32
                    485: 
                    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: 
                    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: 
                    500: To prepare os_win32 directory for MS Visual Studio C++ 2010 [Express],
                    501: use the following on MSYS or Cygwin:
                    502: 
                    503:   mkdir vctmp && cd vctmp
                    504:   ../configure [... any MinGW option set from above ...]
                    505:   make config-vc10
                    506: 
1.1.1.3 ! misho     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
1.1       misho     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: 
                    514: [11] Guidelines for OS/2, eComStation
                    515: =====================================
                    516: 
                    517: To compile the OS/2 code, please run
                    518: 
                    519:   ./os_os2/configure.os2
                    520:   make
                    521:   make install
                    522: 
                    523: [12] Guidelines for OpenBSD
                    524: ===========================
                    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                                      \
                    529:               --sysconfdir=/etc                                        \
                    530:               --docdir=/usr/local/share/doc/smartmontools-VERSION      \
                    531:               --without-initscriptdir                                  \
                    532:               --enable-sample
                    533: 
                    534:   NOTE: --enable-sample will cause the smartd.conf and smartd RC files to
                    535:   be installed with the string '.sample' append to the name, so you will end
                    536:   up with the following:
                    537:         /etc/smartd.conf.sample
                    538: 
                    539: [13] Comments
                    540: ============
                    541: 
                    542: To compile from another directory, you can replace the step
                    543:   ./configure [options]
                    544: by the following:
                    545:   mkdir objdir
                    546:   cd objdir
                    547:   ../configure [options]
                    548: 
                    549: Man pages contents is platform-specific by default. Info specific to other
                    550: platforms may be not visible. To generate man pages with full contents use:
                    551: 
                    552:   make os_man_filter=
                    553: 
                    554: To install to another destination (used mainly by package maintainers,
                    555: or to examine the package contents without risk of modifying any
                    556: system files) you can replace the step:
                    557:   make install
                    558: with:
                    559:   make DESTDIR=/home/myself/smartmontools-package install
                    560: 
                    561: Use a full path. Paths like ./smartmontools-package may not work.
                    562: 
                    563: After installing smartmontools, you can read the man pages, and try
                    564: out the commands:
                    565:    
                    566: man smartd.conf
                    567: man smartctl
                    568: man 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: 
                    573: Note that the default location for the manual pages are
                    574: /usr/share/man/man5 and /usr/share/man/man8.  If "man" doesn't find
                    575: them, you may need to add /usr/share/man to your MANPATH environment
                    576: variable.
                    577: 
                    578: Source and binary packages for Windows are available at
                    579: http://sourceforge.net/projects/smartmontools/files/
                    580: 
                    581: Refer to http://sourceforge.net/apps/trac/smartmontools/wiki/Download
                    582: for any additional download and installation instructions.
                    583: 
                    584: The following files are installed if ./configure has no options:
                    585: 
                    586: /usr/local/sbin/smartctl                                [Executable command-line utility]
                    587: /usr/local/sbin/smartd                                  [Executable daemon]
                    588: /usr/local/sbin/update-smart-drivedb                    [Drive database update script]
                    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]
                    594: /usr/local/share/doc/smartmontools/AUTHORS              [Information about the authors and developers]
1.1.1.3 ! misho     595: /usr/local/share/doc/smartmontools/ChangeLog            [A log of changes. Also see SVN]
1.1       misho     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: 
                    606: If /usr/local/etc/smartd.conf exists and differs from the
                    607: default then the default configuration file is installed as
                    608: /usr/local/etc/smartd.conf.sample instead.
                    609: 
                    610: The commands:
                    611: 
                    612: make htmlman
                    613: make txtman
                    614: 
                    615: may be used to build .html and .txt preformatted man pages.
                    616: These are used by the dist-win32 make target to build the Windows
                    617: distribution.
                    618: The commands also work on other operating system configurations
                    619: if suitable versions of man2html, groff and grotty are installed.
                    620: On systems without man2html, the following command should work
                    621: if groff is available:
                    622: 
                    623: make MAN2HTML='groff -man -Thtml' htmlman
                    624: 
                    625: 
                    626: Some of the source files are prepared for the documentation
                    627: generator Doxygen (http://www.doxygen.org/). If Doxygen is installed,
                    628: the command:
                    629: 
                    630: doxygen
                    631: 
                    632: creates HTML documentation in doc/html and LaTeX documentation
                    633: in doc/latex. If TeX is installed, the following command creates
                    634: a documentation file doc/latex/refman.pdf:
                    635: 
                    636: ( cd doc/latex && make pdf )
                    637: 
                    638: 
                    639: [14] Detailed description of arguments to configure command
                    640: ===========================================================
                    641: 
                    642: When you type:
                    643: ./configure [options]
                    644: there are six particularly important variables that affect where the
                    645: smartmontools software is installed.  The variables are listed here,
                    646: with their default values in square brackets, and the quantities that
                    647: they affect described following that.  This is a very wide table: please read
                    648: it in a wide window.
                    649: 
                    650: OPTIONS              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
                    655: --docdir             ${prefix}/share/doc/smartmontools            Location of the documentation
                    656:                                                                   (autoconf >= 2.60 only, see also --with-docdir below)
                    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
                    662: --with-initscriptdir           auto                               Location of init scripts
                    663: --with-systemdsystemunitdir    auto                               Location of systemd service files
                    664: --with-docdir         ${prefix}/share/doc/smartmontools           Location of the documentation
                    665: --with-exampledir     ${docdir}/examplescripts                    Location of example scripts
                    666: --enable-sample       --disable-sample                            Adds the string '.sample' to the names of the smartd.conf file and the smartd RC file
                    667: --with-os-deps        os_<guessed>.o                              OS dependent module(s)
                    668: --with-selinux        --without-selinux                           Enables SELinux support.  If smartmontools has to create the /dev/tw[ae] device
                    669:                                                                   nodes for 3ware/AMCC controllers, this option ensures that the nodes are created
                    670:                                                                   with correct SELinux file contexts.
                    671: --with-libcap-ng      --with-libcap-ng=auto                       Enables/disables libcap-ng support. If enabled and libcap-ng is
                    672:                                                                   available, option --capabilities is added to smartd.
                    673: --disable-drivedb     --enable-drivedb                            Disables default drive database file '${drivedbdir}/drivedb.h'
                    674: --with-drivedbdir     ${prefix}/share/smartmontools               Directory for 'drivedb.h' (implies --enable-drivedb)
                    675: --enable-savestates   --disable-savestates                        Enables default smartd state files '${savestates}MODEL-SERIAL.ata.state'
                    676: --with-savestates     ${prefix}/var/lib/smartmontools/smartd.     Prefix for smartd state files (implies --enable-savestates)
                    677: --enable-attributelog --disable-attributelog                      Enables default smartd attribute log files
                    678: --with-attributelog   ${prefix}/var/lib/smartmontools/attrlog.    Prefix for smartd attribute log files (implies --enable-attributelog)
                    679: 
                    680: Please note that in previous versions of smartmontools (<= 5.39) the
                    681: default for --with-docdir was
                    682:   ${prefix}/share/doc/smartmontools-VERSION
                    683: This was changed to make it consistent with the default of the
                    684: new --docdir option added in autoconf 2.60.
                    685: 
                    686: The defaults for --with-initscriptdir and --with-systemdsystemunitdir are
                    687: guessed such that the following rules apply:
                    688: - If --prefix=/usr --sysconfdir=/etc is specified, the guessed directories
                    689:   should be the defaults used by the current OS or distribution.
                    690: - If --sysconfdir=/etc is NOT specified, the guessed directories should
                    691:   always be below ${prefix} or below ${sysconfdir}.
                    692: 
                    693: Here's an example:
                    694: If you set --prefix=/home/joe and none of the other four
                    695: variables then the different directories that are used would be:
                    696: --sbindir             /home/joe/sbin
                    697: --docdir              /home/joe/share/doc/smartmontools
                    698: --mandir              /home/joe/share/man
                    699: --sysconfdir          /home/joe/etc
                    700: --with-exampledir     /home/joe/share/doc/smartmontools/examplescripts
                    701: --with-drivedbdir     /home/joe/share/smartmontools
                    702: --with-initscriptdir         [see below]
                    703: --with-systemdsystemunitdir  [see below]
                    704: 
                    705: If systemd is present (and pkg-config reports /lib/systemd/system
                    706: as the systemdsystemunitdir):
                    707: 
                    708: --with-initscriptdir         [disabled]
                    709: --with-systemdsystemunitdir  /home/joe/lib/systemd/system
                    710: 
                    711: else if /etc/rc.d/init.d exists:
                    712: 
                    713: --with-initscriptdir         /home/joe/etc/rc.d/init.d
                    714: --with-systemdsystemunitdir  [disabled]
                    715: 
                    716: else if /etc/init.d exists:
                    717: 
                    718: --with-initscriptdir         /home/joe/etc/init.d
                    719: --with-systemdsystemunitdir  [disabled]
                    720: 
                    721: else if /etc/rc.d exists:
                    722: 
                    723: --with-initscriptdir         /home/joe/etc/rc.d
                    724: --with-systemdsystemunitdir  [disabled]
                    725: 
                    726: else
                    727: 
                    728: --with-initscriptdir         [disabled]
                    729: --with-systemdsystemunitdir  [disabled]
                    730: 
                    731: This is useful for test installs in a harmless subdirectory somewhere.
                    732: 
                    733: Here are the four possible cases for the four variables above:
                    734: 
                    735: Case 1:
                    736: --prefix not set
                    737: --variable not set
                    738: ===> VARIABLE gets default value above
                    739: 
                    740: Case 2:
                    741: --prefix set
                    742: --variable not set
                    743: ===> VARIABLE gets PREFIX/ prepended to default value above
                    744: 
                    745: Case 3:
                    746: --prefix not set
                    747: --variable set
                    748: ===> VARIABLE gets value that is set
                    749: 
                    750: Case 4:
                    751: --prefix is set
                    752: --variable is set
                    753: ===> PREFIX is IGNORED, VARIABLE gets value that is set
                    754: 
                    755: 
                    756: Here are the differences with and without --enable-sample, assuming
                    757: that initscript location is set and no other options specified 
                    758: (see above for details)
                    759: 
                    760: Case 1:
                    761: --enable-sample provided
                    762: ==> Files installed are:
                    763:         /usr/local/etc/smartd.conf.sample
                    764:         /usr/local/etc/rc.d/init.d/smartd.sample
                    765: 
                    766: Case 2:
                    767: --disable-sample provided or parameter left out
                    768: ==> Files installed are:
                    769:         /usr/local/etc/smartd.conf
                    770:         /usr/local/etc/rc.d/init.d/smartd
                    771: 
                    772: Additional information about using configure can be found here:
                    773: http://www.gnu.org/software/autoconf/manual/autoconf.html#Running-configure-Scripts

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>