Ice provides the command-line tool iceserviceinstall to assist you in installing and uninstalling the following Windows services:
Ice includes other programs that can also be run as Windows services, such as the IceBox and IcePatch2 servers. Typically it is not necessary to install these programs as Windows services because they can be launched by an IceGrid node service. However, if you wish to run an IceBox or IcePatch2 server as a Windows service without the use of IceGrid, you must install the service manually (see
page 1918).
iceserviceinstall supports the following options and arguments:
iceserviceinstall [options] service config‑file [property ...]
Options:
‑h, ‑‑help Show this message.
‑n, ‑‑nopause Do not call pause after displaying a message.
‑v, ‑‑version Display the Ice version.
‑u, ‑‑uninstall Uninstall the Windows service.
The service and
config-file arguments are required during installation and uninstallation.
The service argument selects the type of service you are installing; use one of the following values:
Note that the Ice service installer currently does not support the installation of an IceGrid node with a collocated registry, therefore you must install the registry and node separately.
The config-file argument specifies the name of an Ice configuration file. See
page 1914 for additional information.
When installing a service, properties can be defined on the command line using the
--name=value syntax, or they can be defined in the configuration file. The supported properties are described on
page 1915.
None of the Ice services require privileges beyond a normal user account. In the case of the IceGrid node service in particular, we do not recommend running it in a user account with elevated privileges because the service is responsible for launching server executables, and those servers would inherit the node’s access rights. See
page 1912 for more information selecting a user account.
The Ice service installer requires that you specify the path name of the Ice configuration file for the service being installed or uninstalled. The tool needs this path name for several reasons:
You may still modify a service’s configuration file after installation, but you should uninstall and reinstall the service if you change any of the properties that influence the service installer’s actions. The table below describes the service properties that affect the installer:
Ice includes sample configuration files for the IceGrid and Glacier2 services in the config subdirectory of your Ice installation. We recommend that you review the comments and settings in these files to familiarize yourself with a typical configuration of each service.
The Ice service installer uses a set of optional properties that customize the installation process. These properties can be defined in the service’s configuration file as discussed in the previous section, or they can be defined on the command line using the familiar
--name=value syntax:
If num is a value greater than zero, the service is configured to start automatically at system start up. Set this property to zero to configure the service to start on demand instead. If not specified, the default value is
1.
If num is a value greater than zero, the service is configured to depend on the IceGrid registry, meaning Windows will start the registry prior to starting this service. Enabling this feature also requires that the property
Ice.Default.Locator be defined in
config-file. If not specified, the default value is zero.
The Ice service installer performs a number of steps to install a service. As discussed on
page 1914, you must specify the path name of the service’s configuration file because the service installer uses certain properties during the installation process. The actions taken by the service installer are described below:
•
Obtain the service’s instance name from the configuration file. The instance name is specified by the property
IceGrid.InstanceName or
Glacier2.InstanceName. If an instance name is not specified, the default value is
IceGrid or
Glacier2, respectively. If the service being installed depends on the IceGrid registry, the IceGrid instance name is derived from the value of the
Ice.Default.Locator property.
When uninstalling an existing service, the Ice service installer first ensures that the service is stopped, then proceeds to remove the service. The service’s event log source is removed and, if the service is not using the
Application log, the event log registry key is also removed.