📄 install
字号:
[6] Guidelines for Darwin========================= ./configure --with-initscriptdir=/Library/StartupItems If you'd like to build the i386 version on a powerpc machine, you can use CXX='g++ -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386' \ ./configure --host=i386-apple-darwin \ --with-initscriptdir=/Library/StartupItems[7] Guidelines for NetBSD/OpenBSD================================= ./configure --prefix=/usr/pkg \ --with-docdir=/usr/pkg/share/doc/smartmontools On OpenBSD, it is important that you use GNU make (gmake from /usr/ports/devel/gmake) to build smartmontools, as the BSD make doesn't know how to make the manpages.[8] Guidelines for Solaris========================== smartmontools has been partially but not completely ported to Solaris. It includes complete SCSI support but no ATA or 3ware support. It can be compiled with either cc or gcc. To compile with gcc: ./configure [args] make To compile with Sun cc: setenv CC cc [csh syntax], or CC=cc [sh syntax] ./configure [args] make The correct arguments [args] to configure are: --sbindir=/usr/sbin \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --with-docdir=/usr/share/doc/smartmontools-VERSION \ --with-initscriptdir=/etc/init.d To start the script automatically on bootup, create hardlinks that indicate when to start/stop in: /etc/rc[S0123].d/ pointing to /etc/init.d/smartd. Create: K<knum>smartd in rcS.d, rc0.d, rc1.d, rc2.d S<snum>smartd in rc3.d where <knum> is related to <snum> such that the higher snum is the lower knum must be. On usual configuration, '95' would be suitable for <snum> and '05' for <knum> respectively. If you choose these value, you can create hardlinks by: cd /etc sh -c 'for n in S 0 1 2; do ln init.d/smartd rc$n.d/K05smartd; done' sh -c 'for n in 3 ; do ln init.d/smartd rc$n.d/S95smartd; done'[9] Guidelines for Cygwin=========================Same as Red Hat: ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir='${prefix}/share/man' OR EQUIVALENTLY ./configure --sbindir=/usr/sbin \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --with-initscriptdir=/etc/rc.d/init.d \ --with-docdir=/usr/share/doc/smartmontools-VERSION Using DOS text file type as default for the working directories ("textmode" mount option) is not recommended. Building the binaries and man pages using "make" is possible, but "make dist" and related targets work only with UNIX file type ("binmode" mount option) set. The "autogen.sh" script prints a warning if DOS type is selected. If installing from CVS, you may check out all files either with CR/LF or LF line endings. Starting with release 3.1-7, Cygwin's bash does no longer accept scripts with CR/LF by default. To run the initial script ./autogen.sh checked out with CR/LF on a "binmode" mount, type: bash -O igncr ./autogen.sh instead. This is not necessary for the generated ./configure script.[10] Guidelines for Windows==========================To compile the Windows release with MinGW, use the following on Cygwin: ./configure --build=mingw32 make Instead of using "make install", copy the .exe files into some directory in the PATH.To build the Windows binary distribution, use: make dist-win32 This builds the distribution in directory ./smartmontools-VERSION.win32/ and packs it into ./smartmontools-VERSION.win32.zipTo create a Windows installer, use: make installer-win32 This builds the distribution directory and packs it into the self-extracting install program ./smartmontools-VERSION.win32-setup.exe The installer is build using the command "makensis" from the NSIS package. See http://nsis.sourceforge.net/ for documentation and download location. The install script was tested with NSIS 2.17.To both create and run the (interactive) installer, use: make install-win32 Additional make targets are distdir-win32 to build the directory only and cleandist-win32 for cleanup. The binary distribution includes all documentation files converted to DOS text file format and *.html and *.txt preformatted man pages. The tools unix2dos.exe (package cygutils) and zip.exe (package zip or a native Win32 release of Info-ZIP, http://www.info-zip.org) are necessary but may be not installed by Cygwin's default settings. It is also possible to compile smartmontools with MSVC 6.0. The project files (smartmontools_vc6.dsw, smart{ctl,d}_vc6.dsp) are included in CVS (but not in source tarball). The config_vc6.h is no longer maintained in CVS. The command: make config-vc6 builds config_vc6.h from MinGW's config.h. Unlike MinGW, MSVC 6.0 can also be used to build the syslog message file tool syslogevt.exe. See smartd man page for usage information about this tool.[11] Guidelines for OS/2, eComStation=====================================To compile the OS/2 code, please run ./os_os2/configure.os2 make make install[12] Guidelines for OpenBSD========================== To match the way it will installed when it becomes available as a PORT, use the following: ./configure --prefix=/usr/local \ --sysconfdir=/etc --with-initscriptdir=/usr/local/share/doc/smartmontools-VERSION \ --with-docdir=/usr/local/share/doc/smartmontools-VERSION \ --enable-sample It is important that you use GNU make (gmake from /usr/ports/devel/gmake) to build smartmontools, as the default OpenBSD make doesn't know how to build the man pages. NOTE1: --with-initscriptdir installs a SystemV startup script. It really should be --without-initscriptdir, but the Makefile code is incorrect and trys to install the initscript (smartd) to /no. So, an interim fix it to set the initscript dir to the doc dir. NOTE2: --enable-sample will cause the smartd.conf and smartd RC files to be installed with the string '.sample' append to the name, so you will end up with the following: /usr/local/etc/smartd.conf.sample /usr/local/etc/rc.d/smartd.sample[13] Comments============To compile from another directory, you can replace the step ./configure [options]by the following: mkdir objdir cd objdir ../configure [options]To install to another destination (used mainly by package maintainers,or to examine the package contents without risk of modifying anysystem files) you can replace the step: make installwith: make DESTDIR=/home/myself/smartmontools-package installUse a full path. Paths like ~/smartmontools-package may not work.After installing smartmontools, you can read the man pages, and tryout the commands: man smartd.confman smartctlman smartd/usr/sbin/smartctl -s on -o on -S on /dev/hda (only root can do this)/usr/sbin/smartctl -a /dev/hda (only root can do this)Note that the default location for the manual pages are/usr/share/man/man5 and /usr/share/man/man8. If "man" doesn't findthem, you may need to add /usr/share/man to your MANPATH environmentvariable.Source and binary RPM packages are available athttp://sourceforge.net/project/showfiles.php?group_id=64297Refer to http://smartmontools.sourceforge.net/index.html#howtodownloadfor any additional download and installation instructions.The following files are installed if ./configure has no options:/usr/local/sbin/smartd [Executable daemon]/usr/local/sbin/smartctl [Executable command-line utility]/usr/local/etc/smartd.conf [Configuration file for smartd daemon]/usr/local/etc/rc.d/init.d/smartd [Init/Startup script for smartd]/usr/local/share/man/man5/smartd.conf.5 [Manual page]/usr/local/share/man/man8/smartctl.8 [Manual page]/usr/local/share/man/man8/smartd.8 [Manual page]/usr/local/share/doc/smartmontools-5.X/AUTHORS [Information about the authors and developers]/usr/local/share/doc/smartmontools-5.X/CHANGELOG [A log of changes. Also see CVS]/usr/local/share/doc/smartmontools-5.X/COPYING [GNU General Public License Version 2]/usr/local/share/doc/smartmontools-5.X/INSTALL [Installation instructions: what you're reading!]/usr/local/share/doc/smartmontools-5.X/NEWS [Significant bugs discovered in old versions]/usr/local/share/doc/smartmontools-5.X/README [Overview]/usr/local/share/doc/smartmontools-5.X/TODO [Things that need to be done/fixed]/usr/local/share/doc/smartmontools-5.X/WARNINGS [Systems where lockups or other serious problems were reported]/usr/local/share/doc/smartmontools-5.X/smartd.conf [Example configuration file for smartd]/usr/local/share/doc/smartmontools-5.X/examplescripts [Executable scripts for -M exec of smartd.conf (4 files)]The commands:make htmlmanmake txtmanmay be used to build .html and .txt preformatted man pages.These are used by the dist-win32 make target to build the Windowsdistribution.The commands also work on other operating system configurationsif suitable versions of man2html, groff and grotty are installed.On systems without man2html, the following command should workif groff is available:make MAN2HTML='groff -man -Thtml' htmlman[14] Detailed description of arguments to configure command===========================================================When you type:./configure [options]there are six particularly important variables that affect where thesmartmontools software is installed. The variables are listed here,with their default values in square brackets, and the quantities thatthey affect described following that. This is a very wide table: please readit in a wide window.OPTIONS DEFAULT AFFECTS------- ------- ---------prefix /usr/local Please see below--sbindir ${prefix}/sbin Directory for smartd/smartctl executables; Contents of smartd/smartctl man pages--mandir ${prefix}/share/man Directory for smartctl/smartd/smartd.conf man pages--sysconfdir ${prefix}/etc Directory for smartd.conf; Contents of smartd executable; Contents of smartd/smartd.conf man pages; Directory for rc.d/init.d/smartd init script--with-initscriptdir ${sysconfdir}/init.d/rc.d Location of init scripts --with-docdir ${prefix}/share/doc/smartmontools-5.X Location of the documentation--enable-sample --disable-sample Adds the string '.sample' to the names of the smartd.conf file and the smartd RC fileHere's an example:If you set --prefix=/home/joe and none of the other fourvariables then the different directories that are used would be:--sbindir /home/joe/sbin--mandir /home/joe/share/man--sysconfdir /home/joe/etc--with-initscriptdir /home/joe/etc/init.d/rc.d--with-docdir /home/joe/doc/smartmontools-5.XThis is useful for test installs in a harmless subdirectory somewhere.Here are the four possible cases for the four variables above:Case 1:--prefix not set--variable not set===> VARIABLE gets default value aboveCase 2:--prefix set--variable not set===> VARIABLE gets PREFIX/ prepended to default value aboveCase 3:--prefix not set--variable set===> VARIABLE gets value that is setCase 4:--prefix is set--variable is set===> PREFIX is IGNORED, VARIABLE gets value that is setHere are the differences with and without --enable-sample, assumingno other options specified (see above for details)Case 1:--enable-sample provided==> Files installed are: /usr/local/etc/smartd.conf.sample /usr/local/etc/rc.d/init.d/smartd.sampleCase 2:--disable-sample provided or parameter left out==> Files installed are: /usr/local/etc/smartd.conf /usr/local/etc/rc.d/init.d/smartdAdditional information about using configure can be found here:http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_mono/autoconf.html#SEC139
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -