nut/docs/configure.txt

353 lines
11 KiB
Text
Raw Permalink Normal View History

2011-01-26 09:35:08 +00:00
ifdef::website[]
Configure options
=================
endif::website[]
There are a few options that can be given to configure to tweak compiles.
2010-03-25 23:20:59 +00:00
See also "./configure --help" for a current and complete listing.
2011-01-26 09:35:08 +00:00
Driver selection
----------------
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-serial
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Build and install the serial drivers (default: yes)
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-usb
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Build and install the USB drivers (default: auto-detect)
Note that you need to install the libusb development package or files.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-snmp
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Build and install the SNMP drivers (default: auto-detect)
Note that you need to install libsnmp development package or files.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-neon
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Build and install the XML drivers (default: auto-detect)
Note that you need to install neon development package or files.
2010-03-25 23:20:59 +00:00
2011-09-29 18:14:46 +00:00
--with-powerman
Build and install Powerman PDU client driver (default: auto-detect)
This allows to interact with the Powerman daemon, and the numerous
Power Distribution Units (PDU) supported by the project.
Note that you need to install powerman development package or files.
--with-ipmi
--with-freeipmi
Build and install IPMI PSU driver (default: auto-detect)
This allows to monitor numerous Power Supply Units (PSU) found
on servers.
Note that you need to install freeipmi (0.8.5 or higher) development package or
files.
2015-04-30 13:53:36 +00:00
--with-linux_i2c
Build and install i2c drivers (default: auto-detect)
Note that you need to install libi2c development package or files.
2011-01-26 09:35:08 +00:00
--with-drivers=<driver>,<driver>,...
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Specify exactly which driver or drivers to build and install (this
works for serial, usb, and snmp drivers, and overrides the
preceding three options).
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
As of the time of this writing (2010), there are 46 UPS drivers
available. Most users will only need one, a few will need two or
three, and very few people will need all of them.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
To save time during the compile and disk space later on, you can
use this option to just build and install a subset of the drivers.
To select mge-shut and usbhid-ups, you'd do this:
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-drivers=apcsmart,usbhid-ups
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
If you need to build more drivers later on, you will need to rerun
configure with a different list. To make it build all of the
drivers from scratch again, run 'make clean' before starting.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Optional features
-----------------
--with-cgi (default: no)
Build and install the optional CGI programs, HTML files, and sample
CGI configuration files. This is not enabled by default, as they
are only useful on web servers. See data/html/README for additional
information on how to set up CGI programs.
2011-09-29 18:14:46 +00:00
--with-doc=<output-format(s)> (default: no)
Build and install NUT documentation file(s).
The possible values are "html-single" for single page HTML, "html-chunked"
for multi pages HTML, "pdf" for a PDF file or "auto" to build all the
possible previous documentation formats.
Verbose output can be enabled using: ASCIIDOC_VERBOSE=-v make
This feature requires AsciiDoc 8.6.3 (http://www.methods.co.nz/asciidoc).
2016-07-18 00:11:41 +00:00
--with-dev (default: no)
2011-01-26 09:35:08 +00:00
2016-07-18 00:11:41 +00:00
Build and install the upsclient and nutclient library and header files.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-all (no default)
2010-03-25 23:20:59 +00:00
2011-06-01 20:31:49 +00:00
Build and install all of the above (the serial, USB, SNMP, XML/HTTP and
PowerMan drivers, the CGI programs and HTML files, and the upsclient
2011-01-26 09:35:08 +00:00
library).
2010-03-25 23:20:59 +00:00
2013-11-24 15:00:12 +00:00
--with-ssl (default: auto-detect)
--with-nss (default: auto-detect)
--with-openssl (default: auto-detect)
2010-03-25 23:20:59 +00:00
2013-11-24 15:00:12 +00:00
Enable SSL support, using either Mozilla NSS or OpenSSL.
If both are present, and nothing was specified, OpenSSL support will
2015-04-30 13:53:36 +00:00
be preferred. Read docs/security.txt for instructions on SSL support.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-wrap (default: auto-detect)
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Enable libwrap (tcp-wrappers) support. Refer to upsd man page for
more information.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-ipv6 (default: auto-detect)
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Enable IPv6 support.
2010-03-25 23:20:59 +00:00
2012-01-24 10:22:33 +00:00
--with-avahi (default: auto-detect)
Build and install Avahi support, to publish NUT server availability
2015-04-30 13:53:36 +00:00
using mDNS protocol. This requires Avahi development files for the
Core and Client parts.
2012-01-24 10:22:33 +00:00
2012-08-12 21:39:31 +00:00
--with-libltdl (default: auto-detect)
Enable libltdl (Libtool dlopen abstraction) support.
This is required to build nut-scanner.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Other configuration options
---------------------------
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-port=PORT
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Change the TCP port used by the network code. Default is 3493.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Ancient versions of upsd used port 3305. NUT 2.0 and up use a
substantially different network protocol and are not able to
communicate with anything older than the 1.4 series.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
If you have to monitor a mixed environment, use the last 1.4 version,
as it contains compatibility code for both the old "REQ" and the new
"GET" versions of the protocol.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-user=<username>
--with-group=<groupname>
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Programs started as root will setuid() to <username> for somewhat
safer operation. You can override this with -u <user> in several
programs, including upsdrvctl (and all drivers by extension), upsd,
and upsmon. The "user" directive in ups.conf overrides this at run
time for the drivers.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
NOTE: upsmon does not totally drop root because it may need to
initiate a shutdown. There is always at least a stub process
remaining with root powers. The network code runs in another
(separate) process as the new user.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
The <groupname> is used for the permissions of some files,
particularly the hotplugging rules for USB. The idea is that the
device files for any UPS devices should be readable and writable by
members of that group.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
The default value for both the username and groupname is "nobody".
This was done since it's slightly better than staying around as
root. Running things as nobody is not a good idea, since it's a
hack for NFS access. You should create at least one separate user
for this software.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
If you use one of the --with-user and --with-group options, then
you have to use the other one too.
2010-03-25 23:20:59 +00:00
2014-04-22 18:39:47 +00:00
See the INSTALL.nut document and the FAQ for more on this topic.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-logfacility=FACILITY
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Change the facility used when writing to the log file. Read the man
page for openlog to get some idea of what's available on your system.
Default is LOG_DAEMON.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Installation directories
------------------------
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--prefix=PATH
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
This is a fairly standard option with GNU autoconf, and it sets the
base path for most of the other install directories. The default
is /usr/local/ups, which puts everything but the state sockets in one
easy place.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
If you like having things to be at more of a "system" level, setting
the prefix to /usr/local or even /usr might be better.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--exec_prefix=PATH
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
This sets the base path for architecture dependent files. By
default, it is the same as <prefix>.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--sysconfdir=PATH
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Changes the location where NUT's configuration files are stored.
By default this path is <prefix>/etc. Setting this to /etc or
/etc/ups might be useful.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
The NUT_CONFPATH environment variable overrides this at run time.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--bindir=PATH
--sbindir=PATH
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Where executable files will be installed. Files that are normally
executed by root (upsd, upsmon, upssched) go to sbindir, all others
to bindir. The defaults are <exec_prefix>/bin and <exec_prefix>/sbin.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--datadir=PATH
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Change the data directory, i.e., where architecture independent
read-only data is installed. By default this is <prefix>/share,
i.e., /usr/local/ups/share. At the moment, this directory only
holds two files - the optional cmdvartab and driver.list.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--mandir=PATH
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Sets the base directories for the man pages. The default is
<prefix>/man, i.e., /usr/local/ups/man.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--includedir=PATH
2010-03-25 23:20:59 +00:00
2016-07-18 00:11:41 +00:00
Sets the path for include files to be installed when `--with-dev` is
2011-01-26 09:35:08 +00:00
selected. For example, upsclient.h is installed here. The default
is <prefix>/include.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--libdir=PATH
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Sets the installation path for libraries. This is just the
upsclient library for now. The default is <exec_prefix>/lib.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-drvpath=PATH
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
The UPS drivers will be installed to this path. By default they
install to "<exec_prefix>/bin", i.e., /usr/local/ups/bin.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
The "driverpath" global directive in the ups.conf file overrides this
at run time.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-cgipath=PATH
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
The CGI programs will be installed to this path. By default, they
install to "<exec_prefix>/cgi-bin", which is usually /usr/local/ups/cgi-bin.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
If you set the prefix to something like /usr, you should set the
cgipath to something else, because /usr/cgi-bin is pretty ugly and
non-standard.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
The CGI programs are not built or installed by default. Use
"./configure --with-cgi" to request that they are built and
installed.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-htmlpath=PATH
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
HTML files will be installed to this path. By default, this is
"<prefix>/html". Note that HTML files are only installed if
--with-cgi is selected.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-pkgconfig-dir=PATH
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Where to install pkg-config *.pc files. This option only has an
2016-07-18 00:11:41 +00:00
effect if `--with-dev` is selected, and causes a pkg-config file to
2011-01-26 09:35:08 +00:00
be installed in the named location. The default is
<exec_prefix>/pkgconfig.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Use --without-pkgconfig-dir to disable this feature altogether.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-hotplug-dir=PATH
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Where to install Linux 2.4 hotplugging rules. The default is
/etc/hotplug, if that directory exists, and not to install it
otherwise. Note that this installation directory is not a
subdirectory of <prefix> by default. When installing NUT as a
non-root user, you may have to override this option.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Use --without-hotplug-dir to disable this feature altogether.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-udev-dir=PATH
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Where to install Linux 2.6 hotplugging rules, for kernels that have
the "udev" mechanism. The default is /etc/udev, if that directory
exists, and not to install it otherwise. Note that this
installation directory is not a subdirectory of <prefix> by
default. When installing NUT as a non-root user, you may have to
override this option.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Use --without-udev-dir to disable this feature altogether.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Directories used by NUT at run-time
-----------------------------------
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-pidpath=PATH
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Changes the directory where pid files are stored. By default this is
/var/run. Certain programs like upsmon will leave files here.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-altpidpath=PATH
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Programs that normally don't have root powers, like the drivers and
upsd, write their pid files here. By default this is whatever the
statepath is, as those programs should be able to write there.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-statepath=PATH
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Change the default location of the state sockets created by the
drivers.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
The NUT_STATEPATH environment variable overrides this at run time.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Default is /var/state/ups.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Things the compiler might need to find
--------------------------------------
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-gd-includes="-I/foo/bar"
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
If you installed gd in some place where your C preprocessor can't
find the header files, use this switch to add additional -I flags.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-gd-libs="-L/foo/bar -labcd -lxyz"
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
If your copy of gd isn't linking properly, use this to give the
proper -L and -l flags to make it work. See LIBS= in gd's Makefile.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
NOTE: the --with-gd switches are not necessary if you have gd 2.0.8
or higher installed properly. The gdlib-config script will be
detected and used by default in that situation.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-ssl-includes, --with-usb-includes, --with-snmp-includes,
2012-08-12 21:39:31 +00:00
--with-neon-includes, --with-libltdl-includes,
--with-powerman-includes="-I/foo/bar"
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
If your system doesn't have pkg-config and support for any of the above
libraries isn't found (but you know it is installed), you must specify the
compiler flags that are needed.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
--with-ssl-libs, --with-usb-libs, --with-snmp-libs,
2012-08-12 21:39:31 +00:00
--with-neon-libs, --with-libltdl-libs
--with-powerman-libs="-L/foo/bar -labcd -lxyz"
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
If system doesn't have pkg-config or it fails to provides hints for some of the
settings that are needed to set it up properly and the build in defaults are
not right, you can specify the right variables here.