nut-debian/docs/configure.txt

346 lines
11 KiB
Plaintext
Raw Normal View History

2011-01-26 11:35:08 +02:00
ifdef::website[]
Configure options
=================
endif::website[]
There are a few options that can be given to configure to tweak compiles.
2010-03-26 01:20:59 +02:00
See also "./configure --help" for a current and complete listing.
2011-01-26 11:35:08 +02:00
Driver selection
----------------
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-serial
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Build and install the serial drivers (default: yes)
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-usb
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Build and install the USB drivers (default: auto-detect)
Note that you need to install the libusb development package or files.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-snmp
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Build and install the SNMP drivers (default: auto-detect)
Note that you need to install libsnmp development package or files.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-neon
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Build and install the XML drivers (default: auto-detect)
Note that you need to install neon development package or files.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-drivers=<driver>,<driver>,...
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-drivers=apcsmart,usbhid-ups
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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).
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.
--with-lib (default: no)
Build and install the upsclient library and header files.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-all (no default)
2010-03-26 01:20:59 +02:00
2011-06-01 23:31:49 +03: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 11:35:08 +02:00
library).
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-ssl (default: auto-detect)
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Enable SSL development code. Read the section "Configuring SSL" in
docs/security.txt for instructions on SSL support.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-wrap (default: auto-detect)
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Enable libwrap (tcp-wrappers) support. Refer to upsd man page for
more information.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-ipv6 (default: auto-detect)
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Enable IPv6 support.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-hal (default: no)
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Build and install Hardware Abstraction Layer support.
If you own a USB unit, only protect your local system and run the
Gnome or KDE desktop, this will enable a full Plug & Play usage.
See docs/nut-hal.txt for additional information on how to set up
and use HAL support.
--with-powerman (default: auto-detect)
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Build and install Powerman PDU client driver.
This allows to interact with the Powerman daemon, and the numerous
Power Distribution Units (PDU) supported by the project.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Other configuration options
---------------------------
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-port=PORT
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Change the TCP port used by the network code. Default is 3493.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-user=<username>
--with-group=<groupname>
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
If you use one of the --with-user and --with-group options, then
you have to use the other one too.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
See the INSTALL document and the FAQ for more on this topic.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-logfacility=FACILITY
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Installation directories
------------------------
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--prefix=PATH
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--exec_prefix=PATH
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
This sets the base path for architecture dependent files. By
default, it is the same as <prefix>.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--sysconfdir=PATH
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
The NUT_CONFPATH environment variable overrides this at run time.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--bindir=PATH
--sbindir=PATH
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--datadir=PATH
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--mandir=PATH
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Sets the base directories for the man pages. The default is
<prefix>/man, i.e., /usr/local/ups/man.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--includedir=PATH
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Sets the path for include files to be installed when --with-lib is
selected. For example, upsclient.h is installed here. The default
is <prefix>/include.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--libdir=PATH
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Sets the installation path for libraries. This is just the
upsclient library for now. The default is <exec_prefix>/lib.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-drvpath=PATH
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
The "driverpath" global directive in the ups.conf file overrides this
at run time.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-cgipath=PATH
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-htmlpath=PATH
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-pkgconfig-dir=PATH
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Where to install pkg-config *.pc files. This option only has an
effect if --with-lib is selected, and causes a pkg-config file to
be installed in the named location. The default is
<exec_prefix>/pkgconfig.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Use --without-pkgconfig-dir to disable this feature altogether.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-hotplug-dir=PATH
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Use --without-hotplug-dir to disable this feature altogether.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-udev-dir=PATH
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Use --without-udev-dir to disable this feature altogether.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Directories used by NUT at run-time
-----------------------------------
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-pidpath=PATH
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-altpidpath=PATH
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-statepath=PATH
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Change the default location of the state sockets created by the
drivers.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
The NUT_STATEPATH environment variable overrides this at run time.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Default is /var/state/ups.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
Things the compiler might need to find
--------------------------------------
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-gd-includes="-I/foo/bar"
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-gd-libs="-L/foo/bar -labcd -lxyz"
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-ssl-includes, --with-usb-includes, --with-snmp-includes,
--with-neon-includes, --with-powerman-includes="-I/foo/bar"
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-ssl-libs, --with-usb-libs, --with-snmp-libs,
--with-neon-libs, --with-powerman-libs="-L/foo/bar -labcd -lxyz"
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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
linker flags that are needed.
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
HAL addons (deprecated)
-----------------------
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02:00
--with-hal-includes="-DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal \
-I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include"
--with-hal-libs="-lhal -ldbus-1 -lpthread"
--with-hal-user="haldaemon"
--with-hal-device-match-key="info.bus"
--with-hal-callouts-path="${libdir}/hal"
--with-hal-fdi-path="${datarootdir}/hal/fdi/information/20thirdparty"
2010-03-26 01:20:59 +02:00
2011-01-26 11:35:08 +02: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.