An IBM IHS Admin Server is used to facilitate communication between WebSphere and an IHS web server. Typically, the Admin Server is used to start or stop an IHS Web Server, and to propagate the Web Server Plugin configuration file (plugin-cfg.xml) from the WebSphere deployment manager to the IHS web server.
This assumes you are able to start, stop, and restart your IBM IHS admin server using the adminctl command.
Use the ps command to ensure your system is using systemd.
ps -ef | head -2
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 Mar01 ? 00:06:58 /usr/lib/systemd/systemd
If your system is using systemd, create a service file. You can give the file any name you would like.
touch /etc/systemd/system/ibm-ihs-admin-server.service
Update the file to contain the following.
[Unit]
Description=IBM IHS admin server
After=network.target
[Service]
Type=forking
PIDFile=/path/to/logs/admin.pid
ExecStart=/path/to/bin/adminctl -k start
ExecStop=/path/to/bin/adminctl -k stop
[Install]
WantedBy=multi-user.target
Reload the daemons.
systemctl daemon-reload
The systemctl command should now detect the service and return the following.
systemctl status ibm-ihs-admin-server.service
. . .
ibm-ihs-admin-server.service - IBM IHS admin server
Loaded: loaded (/etc/systemd/system/ibm-ihs-admin-server.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Enable the service so that when the system is reboot, the admin server should be started.
systemctl enable ibm-ihs-admin-server.service
. . .
Created symlink from /etc/systemd/system/multi-user.target.wants/ibm-ihs-admin-server.service to /etc/systemd/system/ibm-ihs-admin-server.service.
The systemctl command should now show that the service is enabled.
Loaded: loaded (/etc/systemd/system/ibm-ihs-admin-server.service; enabled; vendor preset: disabled)
You can now use the systemctl command to start, stop, and get the status of the IBM IHS admin server.
systemctl start ibm-ihs-admin-server.service
systemctl stop ibm-ihs-admin-server.service
systemctl status ibm-ihs-admin-server.service
Multiple admin servers
Let's say you have two (or more) admin.conf files, like this.
/opt/IBM/IHS/conf/admin1.conf
/opt/IBM/IHS/conf/admin2.conf
Update the name of the service file to contain the @ character.
/etc/systemd/system/ibm-ihs-admin-server@.service
Update the ExecStart and ExecStop lines in your service file to have the following.
ExecStart=/opt/IBM/IHS/bin/httpd -d /opt/IBM/IHS -f conf/admin%i.conf -k start
ExecStop=/opt/IBM/IHS/bin/httpd -d /opt/IBM/IHS -f conf/admin%i.conf -k stop
Reload the daemons.
systemctl daemon-reload
In this example, the "admin1.conf" server would be used.
systemctl start ibm-ihs-admin-server@1.service
systemctl stop ibm-ihs-admin-server@1.service
systemctl status ibm-ihs-admin-server@1.service
systemctl enable ibm-ihs-admin-server@1.service
In this example, the "admin2.conf" server would be used.
systemctl start ibm-ihs-admin-server@2.service
systemctl stop ibm-ihs-admin-server@2.service
systemctl status ibm-ihs-admin-server@2.service
systemctl enable ibm-ihs-admin-server@2.service
Did you find this article helpful?
If so, consider buying me a coffee over at