CreateInstances - cws-khuntly/WebSphere GitHub Wiki


date: 2025-05-08 15:21:12 created: 2025-05-08 15:21:06 categories:

  • WebSphere / Server Build / Web Server

Create instances

Login to the HTTP server host via SSH

Export the environment variable:

declare -x ENV=XXX

Export the IHS install root variable:

declare -x IHS_INSTALL_ROOT="/opt/IBM/HTTPServer"

Export the WAS install root variable:

declare -x WAS_INSTALL_ROOT="/opt/IBM/WebSphere"

Create the instance directories

mkdir -pv ${IHS_INSTALL_ROOT}/logs/{${WAS_SERVER_NAME}, admin} ${IHS_INSTALL_ROOT}/conf.d/{${WAS_SERVER_NAME}, admin} \

    ${WAS_INSTALL_ROOT}/Plugins/logs/${WAS_SERVER_NAME} ${WAS_INSTALL_ROOT}/Plugins/config/{WAS_SERVER_NAME}

Create SSL configuration directory:

mkdir -pv ${IHS_INSTALL_ROOT}/conf.ssl.d/{${WAS_SERVER_NAME}, admin}

Copy the base configuration:

cp  /nfs/software/WebSphere/IHS/conf/httpd.conf ${IHS_INSTALL_ROOT}/conf/httpd.conf

cp -R /nfs/software/WebSphere/IHS/conf.modules.d ${IHS_INSTALL_ROOT}/conf.modules.d

Copy the instance configuration files to the local workspace:

cp -R  /nfs/software/WebSphere/IHS/conf.d/${ENV}/{admin,${WAS_SERVER_NAME}} ${HOME}/workspace/WebSphere/IHS/conf.d/${ENV}

Update files as necessary and apply to the IHS installation:

cp -R ${HOME}/workspace/WebSphere/IHS/conf.d/${ENV}/* ${IHS_INSTALL_ROOT}/conf.d/

Generate certificate for the IHS administration server:

Disable history logging:

set +o history

Generate the keystore:

${IHS_INSTALL_ROOT}/bin/gskcapicmd -keydb -create -db${IHS_INSTALL_ROOT}/conf.ssl.d/admin/keystore.kdb -pw -stash

Enable history logging:

set -o history

Generate the certificate:

${IHS_INSTALL_ROOT}/bin/gskcapicmd -cert -create -db ${IHS_INSTALL_ROOT}/conf.ssl.d/admin/keystore.kdb -stashed -size 4096 \

    -dn "CN=admin.${SERVER_FQDN},OU=IHS,O=CWS,L=Buffalo,ST=New York,C=US" -label admin-server -expire 730 \

    -san_dnsname "admin.${SERVER_FQDN},${SERVER_FQDN}" -san_ipaddr "${SERVER_IPADDR}" -sigalg sha512

Create the htpasswd authentication database for the administration server:

${IHS_INSTALL_ROOT}/bin/htpasswd -c -B ${IHS_INSTALL_ROOT}/conf.d/admin/.htpasswd ihsadmin

 - Provide appropriate password as obtained from PAM

Start servers:

${IHS_INSTALL_ROOT}/bin/apachectl -d ${IHS_INSTALL_ROOT} -f ${IHS_INSTALL_ROOT}/conf/httpd.conf -D admin -k start

${IHS_INSTALL_ROOT}/bin/apachectl -d ${IHS_INSTALL_ROOT} -f ${IHS_INSTALL_ROOT}/conf/httpd.conf -D ${IHS_INSTANCE} -k start

⚠️ **GitHub.com Fallback** ⚠️