Add apachectl to IBM i for Controlling Apache Web Instances

sobo.redHere at Seiden Group, we seek ways to make IBM i systems more congenial for developers accustomed to other platforms, such as Linux.

Developers coming from a non-IBM i background know how to run the apachectl command to start, restart, and end an Apache web server instance. Instead of apachectl, however, IBM i provides a web-based graphical interface and the commands STRTCPSVR and ENDTCPSVR (be sure to prompt those for parameters using F4).

To supply the “missing” apachectl command for IBM i, I have written a BASH shell script that simulates apachectl on IBM i.

My apachectl scripts can be run like the following, for example, to stop, start, and restart a ZENDPHP7 instance (Zend Server 9):

$ stop zendphp7
$ start zendphp7
$ restart zendphp7

Although BASH isn’t installed by default on IBM i, it is included in the 5733-OPS licensed program product. Once BASH is installed, give the apachetcl shell script for IBM i a try.

If you work with developers or others from a non-IBM i (e.g. Linux) background, contact us for guidance and tools to make them comfortable and successful working with IBM i.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.