Configure directories, non-root_user, and permissions

As part of WebSphere Commerce instance creation, the instance creation scripts running on the application server attempt to upload Web server configuration files to Web server node 1. This directory can be freely chosen at instance creation time. We choose to store the Web server configuration in the same directory as on WebSphere Commerce node 1. The directory is:

WC_Install_Dir/instances/Instance_Name

The instance creation scripts also create the Web server configuration such that the static content for the WebSphere Commerce instance is expected to be in the same directory on the Web server as on the application servers, which is:

WAS_Install_Dir/profiles/Profile_Name/installedApps/Cell_Name/Application_Name

The instance that we use for our scenarios is called demo, so the variables in the directory names would have the values listed in Table 10-2.

Table 10-2 Directory variables for the Web servers

1. We create the two directories mentioned above, as follows (as root):

mkdir -p WC_Install_Dir/instances/Profile_Name
mkdir -p WAS_Install_Dir/profiles/Profile_Name/installedApps
xxxx/Cell_Name/Application_Name

WebSphere Commerce attempts to write configuration files to the Web server node 1 as non-root_user when creating instances (either using FTP or a mounted directory). For this reason, as well as for security reasons, IBM recommends that the IBM HTTP Server and IBM HTTP Server Plug-in installation directories, as well as any WebSphere Commerce specific content directories on the Web server, are owned by a non-root_user.

2. As root, create a non-root group (non-root_group) and a non-root_user (non-root_user) with home directory /home/non-root_user, for which the non-root group is the default group. IBM recommends assigning the same group ID and user ID as for the non-root_user on WebSphere Commerce node 1 (see Installation prerequisites). You may use any tool available to you to create the user and the group. In AIX, this task can be performed by using the smitty tool. After creating the group and the user, you might still need to create the user's home directory /home/non-root_user, if this has not been done by the tools.

3. The user's umask should be 0022. Log in as the new user and at the prompt, type umask to check the umask. If it the result is not 022, change the user's default umask accordingly, for example, by using smitty or adding the command umask 0022 to the user's profile ~non-root_user/.profile.

4. As root, modify ownership and permissions for the IBM HTTP Server and IBM HTTP Server Plug-in installation directories, as well as for the directories created in step 1 above:

chown -R non-root_user:non-root_group IHS_Install_Dir
chown -R non-root_user:non-root_group WAS_Install_Dir
chown -R non-root_user:non-root_group WC_Install_Dir
chown -R non-root_user:non-root_group Plugin_Install_Dir
Variable Value Instance_Name

demo Profile_Name

demo Cell_Name

WC_demo_cell Application_Name

WC_demo.ear

To configure the directories and permissions:

xxxx