Chapter 4. Silent Installation and Instance Creation

Silent installation allows you to use a file to predefine all the answers that you would normally supply to the setup program interactively; this provides you with the ability to script the installation of multiple instances of Red Hat Directory Server (Directory Server). Instance creation enables you to use an existing Directory Server instance to create additional instances of the server under the same server root.

This chapter explains the following:

4.1. Using Silent Installation

Silent installation is intended for use at sites where many server instances must be created. For Directory Server, it is especially useful for heavily replicated sites that create a large number of replica servers.

To use silent installation, you create a silent installation file, supply values for the appropriate installation directives, and run the setup program with the -s and -f command-line options.

The procedure below explains how to use silent installation:

  1. Log in as root.

  2. Create a new directory:

    mkdir ds
    cd ds
  3. If you have not already done so, download the product binaries file to the installation directory.

  4. Unpack the product binaries file using the following command:

    gunzip -dc filename.tar.gz | tar -xvof-

    where filename corresponds to the product binaries file that you want to unpack.

  5. Prepare the file that contains your installation directives.

    Refer to Section 4.1.2 Preparing Silent Installation Files for instructions and for some examples of the silent-install files.

  6. Fill in appropriate values for the installation directives.

    Refer to Section 4.1.3 Specifying Silent Installation Directives for the complete list of silent installation directives that you can use when installing Directory Server.

  7. Run the setup program with the -s and -f command-line options:

    setup -s -f filename

    where filename is the name of the file that contains your installation directives.

4.1.1. Silent Installation on Red Hat Enterprise Linux

It is possible to use silent instance creation on Red Hat Enterprise Linux servers.

  1. Log in as root.

  2. Create a new directory:

    mkdir ds
    cd ds
  3. If you have not already done so, download the product binaries file to the installation directory.

  4. Install the Directory Server as normal, using the command line or the Red Hat RPM tool, system-config-packages (refer to Section 3.4 Installing on Red Hat Enterprise Linux Using a Typical Installation).

  5. Prepare the file that contains your installation directives.

    Refer to Section 4.1.2 Preparing Silent Installation Files for instructions and for some examples of the silent-install files.

  6. Fill in appropriate values for the installation directives.

    Refer to Section 4.1.3 Specifying Silent Installation Directives for the complete list of silent installation directives that you can use when installing Directory Server.

  7. When you run the setup program, specify the .inf file you have created, as follows:

    /opt/redhat-ds/servers/setup/silent.inf

4.1.2. Preparing Silent Installation Files

The best way to create a file for use with silent installation is to use the setup program to create interactively a server instance of the type that you want to duplicate. To do this, run setup with the -k flag. The setup program creates the following file:

	serverRoot/setup/install.inf
      

This file contains all the directives that you would use with silent installation to create the server instance. You can then use this file to create other server instances of that type.

You have to make some modifications to this file before you use it. Specifically, ensure that you have done the following:

  • FullMachineName - Set this directive to a value that is appropriate for the machine on which Directory Server is installed if it is not to be the local machine. In most circumstances, it is best not to use this directive because FullMachineName then defaults to the local host name. However, if you use custom installation to generate your initial server instance, then this directive appears in the install.inf file.

  • ServerIpAddress - Set this directive appropriate for the local machine. The same usage rules apply for ServerIpAddress as for FullMachineName. Specifically, try not to include ServerIpAddress in your install.inf file unless you absolutely have to (as may be necessary for multi-homed systems).

  • ServerRoot - Verify the installation path on this directive. Also, the name of the file-system directory where you install files must not contain any space characters.

  • ServerIdentifier - If you are installing more than one Directory Server on the same host, make sure that this directive contains a unique value for each server instance.

  • SuiteSpotUserID and SuiteSpotGroup - The SuiteSpotUserID and SuiteSpotGroup directives determine under what user and group a server runs when installed.

NoteNote
 

Be sure to protect your install.inf files because they contain passwords in clear. Also ensure that any DNs in these files are in the UTF-8 character set encoding.

The sections that follow provide examples of using silent installation to support the following installation scenarios:

You can find a definition of each of the individual installation directives in Section 4.1.3 Specifying Silent Installation Directives.

NoteNote
 

The silent.inf file provided with the Directory Server is merely a template, an example of how to write your own. For the file to work, many of the parameters (host name, ports, paths, and so on) in the file must be replaced with appropriate values.

It is also easy to generate your own silent installation file using the setup -k option and modifying the resulting install.inf file as needed.

4.1.2.1. Sample File for Typical Installation

The following is an example of the install.inf file that is generated for a typical installation:

[General]
FullMachineName= dir.example.com
SuiteSpotUserID= nobody
SuiteSpotGroup= nobody
ServerRoot= /opt/redhat-ds/servers
AdminDomain= example.com
ConfigDirectoryAdminID= admin
ConfigDirectoryAdminPwd= admin
ConfigDirectoryLdapURL= ldap://dir.example.com:389/o=NetscapeRoot
UserDirectoryAdminID= admin
UserDirectoryAdminPwd= admin
UserDirectoryLdapURL= ldap://dir.example.com:389/dc=example,dc=com
Components= svrcore,base,slapd,admin,nsperl,perldap

[slapd]
SlapdConfigForMC= Yes
SecurityOn= No
UseExistingMC= No
UseExistingUG= No
ServerPort= 389
ServerIdentifier= dir
Suffix= dc=example,dc=com
RootDN= cn=Directory Manager
UseReplication= No
AddSampleEntries= No
InstallLdifFile= suggest
AddOrgEntries= Yes
DisableSchemaChecking= No
RootDNPwd= admin123
Components= slapd,slapd-client

[admin]
SysUser= root
Port= 23611
ServerIpAddress= 111.11.11.11
ServerAdminID= admin
ServerAdminPwd= admin
Components= admin,admin-client

[base]
Components= base,base-client,base-jre

[nsperl]
Components= nsperl561

[perldap]
Components= perldap14

4.1.2.2. Sample File for Using an Existing Configuration Directory

The following is an example of the install.inf file that is generated when you perform a typical installation and you choose to use an existing Directory Server as the configuration directory:

[General]
FullMachineName= dir.example.com
SuiteSpotUserID= nobody
SuiteSpotGroup= nobody
ServerRoot= /opt/redhat-ds/servers
AdminDomain= example.com
ConfigDirectoryAdminID= admin
ConfigDirectoryAdminPwd= admin
ConfigDirectoryLdapURL= ldap://dir.example.com:25389/o=NetscapeRoot
UserDirectoryLdapURL= ldap://dir.example.com:18257/dc=example,dc=com
UserDirectoryAdminID= cn=Directory Manager
UserDirectoryAdminPwd= admin123
Components= svrcore,base,slapd,admin,nsperl,perldap
 
[slapd]
SlapdConfigForMC= No
SecurityOn= No
UseExistingMC= Yes
UseExistingUG= No
ServerPort= 18257
ServerIdentifier= directory
Suffix= dc=example,dc=com
RootDN= cn=Directory Manager
UseReplication= No
AddSampleEntries= No
InstallLdifFile= suggest
AddOrgEntries= Yes
DisableSchemaChecking= No
RootDNPwd= admin123
Components= slapd,slapd-client
 
[admin]
SysUser= root
Port= 33646
ServerIpAddress= 111.11.11.11
ServerAdminID= admin
ServerAdminPwd= admin
Components= admin,admin-client
 
[base]
Components= base,base-client,base-jre
 
[nsperl]
Components= nsperl561
 
[perldap]
Components= perldap14

4.1.2.3. Sample File for Installing the Standalone Red Hat Console

The following is an example of the install.inf file that is generated when you install just Red Hat Console:

[General]
FullMachineName= dir.example.com
ConfigDirectoryLdapURL= ldap://dir.example.com:389/o=NetscapeRoot
SuiteSpotUserID= nobody
SuiteSpotGroup= nobody
ConfigDirectoryAdminID= admin
ConfigDirectoryAdminPwd= admin
ServerRoot= /opt/redhat-ds/servers
Components= svrcore,base,slapd,admin
 
[base]
Components= base-client
 
[slapd]
Components= slapd-client
 
[admin]
Components= admin-client,base-jre

4.1.3. Specifying Silent Installation Directives

This section describes the basic format of the file used for silent installation. It then describes the directives that are available for each area of the silent installation file.

4.1.3.1. Silent Installation File Format

When you use silent installation, you provide all the installation information in a file. This file is formatted as follows:

[General]
directive=value
directive=value
directive=value
...

[slapd]
directive=value
directive=value
directive=value
...

[admin]
directive=value
directive=value
directive=value
...

[Base]
directive=value
directive=value
directive=value
...

The keywords [General], [slapd], and [admin] are required. They indicate that the directives that follow are meant for a specific aspect of the installation. They must be provided in the file in the order indicated above.

4.1.3.2. [General] Installation Directives

[General] installation directives specify information of global interest to the Directory Servers installed at your site. That is, the information you provide here is common to all your Directory Servers.

The [General] installation directives are listed in Table 4-1.

DirectiveDescription
Components

Specifies components to be installed. The list of available components differs depending on the servers available on your installation media. For stand-alone directory installation, the list of components is:

svrcore - Uninstallation binaries
base - The base installation package
admin - The Administration Server binaries
slapd - The Directory Server binaries

This directive is required. At a minimum, you should always provide components=svrcore,base,admin

ServerRootSpecifies the full path to the directory where the Directory Server binaries are installed. This directive is required.
FullMachineNameSpecifies the fully qualified domain name of the machine on which you are installing the server. The default is the local host name.
SuiteSpotUserIDSpecifies the user name the servers run as. This parameter does not apply to the user as which the Administration Server runs. See the SysUser directive in Table 4-4 for more information. The default is user nobody, but this should be changed for most deployments.
SuiteSpotGroupSpecifies the group the servers run as. The default is group nobody, but this should be changed for most deployments.
ConfigDirectoryLdapURLSpecifies the LDAP URL that is used to connect to your configuration directory. LDAP URLs are described in the Red Hat Directory Server Administration Guide. This directive is required.
AdminDomainSpecifies the administration domain that this server is registered under. Refer to Section 1.2.8 Determining the Administration Domain for more information about administration domains.
ConfigDirectoryAdminIDSpecifies the user ID of the entry that has administration privileges to the configuration directory. This directive is required.
ConfigDirectoryAdminPwdSpecifies the password for the ConfigDirectoryAdminID. This directive is required.
UserDirectoryLdapURLSpecifies the LDAP URL that is used to connect to the directory where your user and group data are stored. If this directive is not supplied, the configuration directory is used for this purpose. LDAP URLs are described in the ^Red Hat Directory Server Administration Guide.
UserDirectoryAdminIDSpecifies the user ID of the entry that has administration privileges to the user directory.
UserDirectoryAdminPwdSpecifies the password for the UserDirectoryAdminID.

Table 4-1. [General] Installation Directives

4.1.3.3. [slapd] Installation Directives

[slapd] installation directives specify information of interest only to the Directory Server instance that you are currently installing. These directives are classified as follows:

Required [slapd] Installation Directives

You must provide these directives when you use silent installation with Directory Server.

Optional [slapd] Installation Directives

You may provide these directives when you use silent installation with Directory Server.

Table 4-2 and Table 4-3 list the directives.

Required DirectiveDescription
Components

Specifies the slapd components to be installed. The components are:

slapd - Install Directory Server
slapd-client - Install Directory Server Console

This directive is required. It is recommended that you always install both components any time you install the Directory Server.

ServerPortSpecifies the port the server uses for LDAP connections. For information on selecting server port numbers, see Section 1.2.1 Choosing Unique Port Numbers. This directive is required.
ServerIdentifierSpecifies the server identifier. This directive is required. This value is used as part of the name of the directory in which the Directory Server instance is installed. For example, if your machine's host name is phonebook, then this name is the default, and selecting it causes the Directory Server instance to be installed into a directory labeled slapd-phonebook.
SuffixSpecifies the suffix that you store your directory data under. For information on suffixes, see Section 1.2.5 Determining Your Directory Suffix. This directive is required.
RootDNSpecifies the distinguished name used by the directory manager. For information on the directory manager, see Section 1.2.4 Defining Authentication Entities. This directive is required.
RootDNPwdSpecifies the directory manager's password. This directive is required.

Table 4-2. Required [slapd] Installation Directives

Optional DirectiveDescription
AddSampleEntriesIf set to yes, this directive causes the example.ldif sample directory to be loaded. Use this directive if you are installing the Directory Server for evaluation purposes and you do not already have an LDIF file with which to populate your directory. Default is no.
AddOrgEntriesIf set to yes, this directive causes the new Directory Server instance to be created with a suggested directory structure and access control. If this directive is used and InstallLdifFile is also used, then this directive has no effect. Default is no.
InstallLdifFileCauses the contents of the LDIF file to be used to populate your directory.

Table 4-3. Optional [slapd] Installation Directives

4.1.3.4. [admin] Installation Directives

[admin] installation directives specify information of interest only to your Directory Server's Administration Server. That is, this is the installation information required for the Administration Server that is used to manage the Directory Server instance that you are currently installing.

The [admin] installation directives are listed in Table 4-4.

DirectiveDescription
Components

Specifies the admin components to be installed. The base components are:

admin - Install Administration Server. You must install the Administration Server if you are also installing some other server, such as Directory Server
admin-client - Install Red Hat Console

Specify just this component if you are installing Red Hat Console as stand-alone. Do not install this component if you do remotely manage your servers and Red Hat Console is installed somewhere else on your network.

SysUserSpecifies the user the Administration Server runs as. For default installations that use the default port numbers, this user must be root, which is the default. For information as to what users your servers should run, refer to Section 1.2.3 Deciding the User and Group for Your Servers.
PortSpecifies the port that the Administration Server uses. The Administration Server's host name is given by the FullMachineName directive. For more information on FullMachineName, refer to Table 4-1.
ServerAdminIDSpecifies the administration ID that can be used to access this Administration Server if the configuration directory is not responding. The default is to use the value specified by the ConfigDirectoryAdminID directive. See Section 1.2.4 Defining Authentication Entities for information on this directive.
ServerAdminPwdSpecifies the password for ServerAdminID.
ServerIpAddressSpecifies the IP address the Administration Server listens to. Use this directive if you are installing on a multi-homed system and you do not want to use the first IP address for your Administration Server.

Table 4-4. [admin] Installation Directives

4.1.3.5. [Base] Installation Directive

There is only one [Base] installation directive, and it allows you to determine whether Red Hat Console is installed. Table 4-5 the directive.

DirectiveDescription
Components

Specifies the base components to be installed. The base components are:

base - Install the shared libraries used by all Server Consoles. You must install this package if you are also installing some other server, such as Directory Server.
base-client - Install the Java run time environment used by the Server Consoles.
base-jre - Causes the Java run time environment to be installed.

This directive is required if you are installing a server instead of just the Console. You must install both packages when you are installing a server.

Table 4-5. [Base] Installation Directive

4.1.3.6. [nsperl] Installation Directives

There is only one [nsperl] installation directive, and it allows you to determine whether nsPerl is to be installed. Table 4-6 lists the directive.

DirectiveDescription
ComponentsSpecifies whether nsperl that is bundled with Directory Server is to be installed. This nsPerl is a CPAN perl, built and maintained for use by Red Hat server products. The nsperl561 (Install nsPerl version 5.6.1.) directive is required if you are installing a server instead of just the Console.

Table 4-6. [nsperl] Installation Directive

4.1.3.7. [perldap] Installation Directives

There is only one [perldap] installation directive, and it allows you to determine whether PerLDAP is to be installed. Table 4-7 lists the directive.

DirectiveDescription
Componentsperldap14 - Install perLDAP version 1.4.1. specifies whether perldap that is bundled with Directory Server is to be installed. This is mozilla.org PerLDAP, built and maintained at Red Hat and used by Red Hat server products. This directive is required if you are installing a server instead of just the Console.

Table 4-7. [perldap] Installation Directive