]>
Commit | Line | Data |
---|---|---|
832b75ed GG |
1 | Smartmontools installation instructions |
2 | ======================================= | |
3 | ||
3d17a85c | 4 | $Id: INSTALL 3817 2013-06-09 16:59:50Z chrfranke $ |
832b75ed GG |
5 | |
6 | Please also see the smartmontools home page: | |
7 | http://smartmontools.sourceforge.net/ | |
8 | ||
9 | Table 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 | ||
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 \ | |
d008864d GI |
262 | --docdir=/usr/local/share/doc/smartmontools \ |
263 | --with-initscriptdir=/usr/local/etc/init.d | |
832b75ed GG |
264 | |
265 | Red 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 | |
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 \ | |
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 | ||
300 | SuSE: | |
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 | ||
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 \ | |
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 | 410 | To 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 | 418 | Cross-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 |
426 | Cross-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 |
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' \ | |
a7e8ffec GI |
440 | CXX='g++-3 -mno-cygwin' \ |
441 | CXXFLAGS='-g -O2 -Wall -W -Wno-format' | |
cfbba5b9 GI |
442 | |
443 | Cross-compile on Debian Linux with gcc-mingw32: | |
444 | ||
445 | ./configure --build=$(./config.guess) \ | |
446 | --host=i586-mingw32msvc | |
eb07ddf2 GI |
447 | |
448 | ||
832b75ed GG |
449 | To 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 |
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 | |
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 |
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 | ||
4d59bff9 GG |
482 | To 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 |
500 | To prepare os_win32 directory for MS Visual Studio C++ 2010 [Express], |
501 | use 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 | ||
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 | |
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 | ||
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 | ||
d008864d GI |
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 | ||
832b75ed GG |
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 | ||
d008864d | 561 | Use a full path. Paths like ./smartmontools-package may not work. |
832b75ed GG |
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 | ||
cfbba5b9 GI |
578 | Source and binary packages for Windows are available at |
579 | http://sourceforge.net/projects/smartmontools/files/ | |
832b75ed | 580 | |
cfbba5b9 | 581 | Refer to http://sourceforge.net/apps/trac/smartmontools/wiki/Download |
832b75ed GG |
582 | for any additional download and installation instructions. |
583 | ||
584 | The 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 | ||
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. | |
832b75ed GG |
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 | ||
2127e193 GI |
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 | ||
832b75ed GG |
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 | |
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 | |
a23d5117 | 664 | --with-docdir ${prefix}/share/doc/smartmontools Location of the documentation |
cfbba5b9 | 665 | --with-exampledir ${docdir}/examplescripts Location of example scripts |
2127e193 GI |
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) | |
cfbba5b9 | 668 | --with-selinux --without-selinux Enables SELinux support. If smartmontools has to create the /dev/tw[ae] device |
2127e193 GI |
669 | nodes for 3ware/AMCC controllers, this option ensures that the nodes are created |
670 | with correct SELinux file contexts. | |
cfbba5b9 | 671 | --with-libcap-ng --with-libcap-ng=auto Enables/disables libcap-ng support. If enabled and libcap-ng is |
a23d5117 | 672 | available, option --capabilities is added to smartd. |
cfbba5b9 | 673 | --disable-drivedb --enable-drivedb Disables default drive database file '${drivedbdir}/drivedb.h' |
bed94269 | 674 | --with-drivedbdir ${prefix}/share/smartmontools Directory for 'drivedb.h' (implies --enable-drivedb) |
2127e193 | 675 | --enable-savestates --disable-savestates Enables default smartd state files '${savestates}MODEL-SERIAL.ata.state' |
bed94269 GI |
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) | |
832b75ed | 679 | |
a23d5117 GI |
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 | ||
a7e8ffec GI |
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 | ||
832b75ed GG |
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 | |
a7e8ffec | 697 | --docdir /home/joe/share/doc/smartmontools |
832b75ed GG |
698 | --mandir /home/joe/share/man |
699 | --sysconfdir /home/joe/etc | |
a7e8ffec GI |
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] | |
832b75ed GG |
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 | |
a7e8ffec GI |
757 | that initscript location is set and no other options specified |
758 | (see above for details) | |
832b75ed GG |
759 | |
760 | Case 1: | |
761 | --enable-sample provided | |
762 | ==> Files installed are: | |
cfbba5b9 GI |
763 | /usr/local/etc/smartd.conf.sample |
764 | /usr/local/etc/rc.d/init.d/smartd.sample | |
832b75ed GG |
765 | |
766 | Case 2: | |
767 | --disable-sample provided or parameter left out | |
768 | ==> Files installed are: | |
cfbba5b9 GI |
769 | /usr/local/etc/smartd.conf |
770 | /usr/local/etc/rc.d/init.d/smartd | |
832b75ed GG |
771 | |
772 | Additional information about using configure can be found here: | |
cfbba5b9 | 773 | http://www.gnu.org/software/autoconf/manual/autoconf.html#Running-configure-Scripts |