I have a need to develop a CL script to quickly deploy a web application across a set of IBMi systems.
Right now, I have everything set up where I can create the directories, deploy the configurations (with the correct modifications) and place the files all from the CL script, but I cannot get it to automatically create and start the HTTP Server.
All of the documentation I can find requires that the servers be set up through the "IBM Web Administration for iSeries interface." Which is pretty much useless if I am trying to automate the entire system.
The only CL commands I can find which are of use are STRTCPSVR and ENDTCPSVR . However, there does not seem to be a clear way to add the server to the underlying system to start it.
Does anyone know of a CL command that does this? If not, is there an object/member I can edit which would add a server to the HTTPA, set it to point to the already set up htdocs and conf directories and then I can start it with STRTCPSVR?
See the Create Apache Server Instance (QzuiCreateInstance) API for a method to automate the creation of http instances.
The QzuiCreateInstance() API allows users to create a new IBM® HTTP Server for i server instance.
Also the QUSRSYS/QATMHINSTC
file contains a member for every configured instance. Each member has one record that contains an entry in the format of -apache -d /www/instancename -f conf/httpd.conf
. You may be able to create members and add the record without using the API.