Update the /etc/inittab file with directory server entries to configure autostart of a directory server instance on AIX®. For Linux™ if the RHEL or SLES system is configured with older upstart method of using inittab, use the method provided in Step 2. If the Linux system is configured to use newer systemd as the default unit system, use the method provided in Step 3.
Before you begin
To configure a directory server instance for starting automatically after you start the operating system, your computer must meet the following requirements:
- The computer must contain a directory server instance that can be run in normal mode.
Procedure
-
Log in as a root user.
-
Configure a directory server instance for autostart on AIX. For Linux configured with
upstart method of using inittab, add the following entries in the /etc/inittab file:
-
To add the
idsslapd process and administration server that is associated with a directory server instance, add the following entries:
- AIX
srv1:2:once:/opt/IBM/ldap/V11.0.1/sbin/idsslapd -I instance_name > /dev/null 2>&1 #Autostart IBM® Verify Directory Instance
adm1:2:once:/opt/IBM/ldap/V11.0.1/sbin/ibmdiradm -I instance_name > /dev/null 2>&1 #Autostart IBM Directory Administration Server
- Linux
srv1:2345:once:/opt/ibm/ldap/V11.0.1/sbin/ibmslapd -I instance_name > /dev/null 2>&1 #Autostart IBM Verify Directory Instance
adm1:2345:once:/opt/ibm/ldap/V11.0.1/sbin/ibmdiradm -I instance_name > /dev/null 2>&1 #Autostart IBM Directory Administration Server
Substitute the
instance_name variable with your instance name.
-
To add the
idsslapd process and administration server that is associated with a proxy server instance, you must first start the directory server instances.
You must start all the directory servers with DB2® database before you start the proxy server. If your computer contains full directory servers and a proxy server, add a delay between the full directory server and the proxy server startup. In the following example, the delay is introduced by adding an entry of the following format, id:2345:wait, the /etc/inittab file.
- AIX
srv1:2345:once:/opt/IBM/ldap/V11.0.1/sbin/idsslapd -I instance_name1 > /dev/null 2>&1 #Autostart IBM Verify Directory Instance
adm1:2345:once:/opt/IBM/ldap/V11.0.1/sbin/ibmdiradm -I instance_name1 > /dev/null 2>&1 #Autostart IBM Directory Administration Server
srv2:2345:once:/opt/IBM/ldap/V11.0.1/sbin/idsslapd -I instance_name2 > /dev/null 2>&1 #Autostart IBM Verify Directory Instance
adm2:2345:once:/opt/IBM/ldap/V11.0.1/sbin/ibmdiradm -I instance_name2 > /dev/null 2>&1 #Autostart IBM Directory Administration Server
srv3:2345:wait:/opt/IBM/ldap/V11.0.1/sbin/idsslapd -I proxy_instance1 -k > /dev/null 2>&1 #Autostart IBM Directory Proxy Server Instance
adm3:2345:wait://opt/IBM/ldap/V11.0.1/sbin/ibmdiradm -I proxy_instance1 -k > /dev/null 2>&1 #Autostart IBM Directory Administration Server
srv4:2345:wait:/opt/IBM/ldap/V11.0.1/sbin/idsslapd -I proxy_instance1 > /dev/null 2>&1 #Autostart IBM Directory Proxy Server Instance
adm4:2345:wait://opt/IBM/ldap/V11.0.1/sbin/ibmdiradm -I proxy_instance1 > /dev/null 2>&1 #Autostart IBM Directory Administration Server
Substitute the
instance_name1 and
instance_name2 variables with your directory server instance names. Substitute the
proxy_instance1 variable with your proxy server instance name.
-
On the Linux systems configured to use newer
systemd as the default unit system, add the service entries:
-
Find the instance name for which the auto start is required, by using the command
idsilist: (in this example the instance name is sdsinst1):
==> /opt/ibm/ldap/V11.0.1/sbin/idsilist -a
Directory server instance(s):
--------------------------------------
Name: sdsinst1
Version: 11.0.1
Location: /home/sdsinst1
Description: IBM Verify Directory Instance V11.0.1
IP Addresses: All available
Port: 389
Secure Port: 636
Admin Server Port: 3538
Admin Server Secure Port: 3539
Type: Directory Server
-
Create a
systemd unit file for ibmslapd auto start in systemd folder:
/etc/systemd/system/ibmslapd_<Instance Name>.service
e.g.:
/etc/systemd/system/ibmslapd_sdsinst1.service
-
Edit the
systemd unit file and put the following contents (substitute appropriate value for Instance_Name):
# Start of service file
[Unit]
Description=IBM Verify Directory Server <Instance_Name>
After=network.target
[Service]
Type=forking
ExecStart=/opt/ibm/ldap/V11.0.1/sbin/ibmslapd -I <Instance_Name> -n
ExecStop=/opt/ibm/ldap/V11.0.1/sbin/ibmslapd -I <Instance_Name> -k
KillMode=process
LimitNOFILE=65536
LimitNPROC=65536
LimitCORE=infinity
[Install]
WantedBy=multi-user.target
# End of service file
e.g.:
# Start of service file
[Unit]
Description=IBM Verify Directory Server sdsinst1
After=network.target
[Service]
Type=forking
ExecStart=/opt/ibm/ldap/V11.0.1/sbin/ibmslapd -I sdsinst1 -n
ExecStop=/opt/ibm/ldap/V11.0.1/sbin/ibmslapd -I sdsinst1 -k
KillMode=process
[Install]
WantedBy=multi-user.target
# End of service file
-
Enable and start the service for
ibmslapd process of the instance:
==> systemctl enable ibmslapd_<Instance_Name>.service
==> systemctl start ibmslapd_<Instance_Name>.service
e.g.:
==> systemctl enable ibmslapd_sdsinst1.service
==> systemctl start ibmslapd_sdsinst1.service
-
Similarly, create a
systemd unit file for ibmdiradm auto start in systemd folder:
/etc/systemd/system/ibmdiradm_<Instance Name>.service
e.g.:
/etc/systemd/system/ibmdiradm_sdsinst1.service
-
Edit the
systemd unit file and put the following contents (substitute appropriate value for Instance_Name):
# Start of service file
[Unit]
Description=IBM Verify Directory Admin Server <Instance_Name>
After=network.target
[Service]
Type=forking
ExecStart=/opt/ibm/ldap/V11.0.1/sbin/ibmdiradm -I <Instance_Name>
ExecStop=/opt/ibm/ldap/V11.0.1/sbin/ibmdiradm -I <Instance_Name> -k
KillMode=process
[Install]
WantedBy=multi-user.target
# End of service file
e.g.:
# Start of service file
[Unit]
Description=IBM Verify Directory Admin Server sdsinst1
After=network.target
[Service]
Type=forking
ExecStart=/opt/ibm/ldap/V11.0.1/sbin/ibmdiradm -I sdsinst1
ExecStop=/opt/ibm/ldap/V11.0.1/sbin/ibmdiradm -I sdsinst1 -k
KillMode=process
[Install]
WantedBy=multi-user.target
# End of service file
-
Enable and start the service for
ibmdiradm process of the instance:
==> systemctl enable ibmdiradm_<Instance_Name>.service
# systemctl start ibmdiradm_<Instance_Name>.service
e.g.:
# systemctl enable ibmdiradm_sdsinst1.service
# systemctl start ibmdiradm_sdsinst1.service
Results
After the entries are added to either the /etc/inittab file (Step 2), or systemd unit files are added and enabled (Step 3), the directory server instance can autostart after system restart.