Monday, 4 December 2017

Running IBM HTTP Server via Linux scripts and sudo - an update

This updates a post that I wrote back in 2012, which was based around Red Hat Enterprise Linux 6.

I've had another go at this, testing on Red Hat Enterprise Linux 7.4, and have a different solution.

In essence, RHEL 7 is now using systemd rather than chkconfig, so here's an alternative: -

Create the Service - as root

vi /etc/systemd/system/ibmhttpd.service  

Description=IBM HTTP Server

ExecStart=/opt/ibm/HTTPServer/bin/apachectl -k start -f /opt/ibm/HTTPServer/MFP/conf/httpd.conf
ExecStop=/opt/ibm/HTTPServer/bin/apachectl -k stop -f /opt/ibm/HTTPServer/MFP/conf/httpd.conf


Reload systemd - as root

sudo systemctl daemon-reload

Start the service - as root

systemctl start ibmhttpd

Check the service status - as root

systemctl status ibmhttpd

Stop the service - as root

systemctl stop ibmhttpd

Register the service to auto-start - as root

systemctl enable ibmhttpd

This is somewhat simpler than the older chkconfig approach.

With thanks to this: -

and this: -

for inspiration.

No comments:

Grokking grep

A colleague was tinkering with grep  and, thanks to him, I discovered a bit more about the trusty little utility. I had not really explored ...