Feature Pack 7 or later

Deploying the WebSphere Commerce search server locally in the standard configuration

You can deploy the search server on your WebSphere Commerce server by running the feature enablement scripts. This script creates and deploys a separate search profile and web module on the same machine as the WebSphere Commerce profile.

Before you begin

  • SolarisLinuxAIXEnsure that you are logged on as the WebSphere Commerce non-root user.
  • WindowsLog on with a user ID that is a member of the Windows Administration group.
  • For IBM i OS operating systemEnsure that you are logged on as a user that has *SECOFR authority.
  • WebSphere Commerce DeveloperEnsure that the test server is stopped and that Rational Application Developer is not running.
  • Ensure that your administrative server is started. For example:
    • If WebSphere Commerce is managed by WebSphere Application Server Deployment Manager (DMGR), start the deployment manager and all node agents. Your cluster can also be started.
    • If WebSphere Commerce is not managed by WebSphere Application Server Deployment Manager (DMGR), start the WebSphere Application Server server1.
  • Ensure that your web server is listening to SSL port 443. The web server certificate is imported over SSL port 443 during the foundation feature enablement. If the web server certificate is not imported, store preview might result in SSL handshake errors. For more information, see Troubleshooting: SSL handshake exception in store preview.

Procedure

  1. Go to the following directory:
    • WC_installdir/bin
    • WebSphere Commerce DeveloperWCDE_installdir\bin
  2. Start the server1 instance:
    • SolarisLinuxAIX./startServer.sh server1
    • WindowsstartServer.bat server1
  3. Run the enablement script:
    For enabling WebSphere Commerce search:
    • Windowsconfig_ant.bat -buildfile WC_installdir/components/common/xml/enableFeature.xml -DinstanceName=instance_name -DfeatureName=foundation -DdbUserPassword=db_password [-DsolrHome=solrhome] [-DSolrWASAdminUser=solr_wasadminuser -DSolrWASAdminPassword=solr_wasadminpassword] [search_server_config]
    • SolarisLinuxAIX./config_ant.sh -buildfile WC_installdir/components/common/xml/enableFeature.xml -DinstanceName=instance_name -DfeatureName=foundation -DdbUserPassword=db_password [-DsolrHome=solrhome] [-DSolrWASAdminUser=solr_wasadminuser -DSolrWASAdminPassword=solr_wasadminpassword] [search_server_config]
    • For IBM i OS operating system./config_ant.sh -buildfile WC_installdir/components/common/xml/enableFeature.xml -DinstanceName=instance_name -DfeatureName=foundation -DdbUserPassword=db_password [-DSolrWASAdminUser = solr_wasadminuser] [-DSolrWASAdminPassword = solr_wasadminpassword] [-Dscchost=HostForScheduledJobs] [search_server_config]
    • WebSphere Commerce DeveloperenableFeature.bat -DfeatureName=foundation [-DsolrHome=solrhome]
    Where:
    solrhome
    Optional: The location of the Solr home directory path that contains the index data of Solr. The value must be an absolute path.
    The default value is in the following locations:
    • WebSphere Commerce DeveloperWCDE_installdir/search/solr/home
    • SolarisLinuxAIXWindowsWC_installdir/instances/instance_name/search/solr/home
    solr_wasadminuser
    The WebSphere Application Server administrator user ID for the Solr cell.
    solr_wasadminpassword
    The WebSphere Application Server administrator password for the Solr cell.
    When:
    • A previous version of WebSphere Commerce search is enabled from an earlier Feature Pack version (for example, Feature Pack 2), and
    • WebSphere Application Server administrative security is enabled on the search server and Solr cell, and
    The search_server_config options help automate updating the web server configuration for IBM HTTP Server. If you do not use this option, you must manually configure your web server after you run the enablement script, as described in the next step. When the search_server_config options are used, WebSphere Commerce search helps automate creating the web server configuration. This automation is achieved by passing in more configuration parameters when you run the enablement scripts.
    Important: The automated web server configuration supports IBM HTTP Server (IHS) only. That is, it does not support or include steps for configuring non-IHS web servers such as IIS and SunOne. For other types of web servers, consult the documentation that is provided by the web server vendor to update the configuration.
    This approach includes the following considerations:
    • The WebSphere Commerce search web server's httpd.conf file is automatically created.
    • You can set up a valid configuration where the WebSphere Commerce search and WebSphere Commerce web servers have separate configuration files. That is, you do not need to manually update the plugin-cfg.xml files.
    • If preferred, you do not need to install another copy of IBM HTTP Server. The same installation can be shared with the WebSphere Commerce web server.

      A second IHS process is started to handle search HTTP requests that use the same IHS installation. A second process ensures that the configurations do not collide, while it eases configuration and maintenance.

    Important: You can skip updating the web server configuration if you previously enabled the feature foundation and passed in the search_server_config parameters during the enablement. You can also skip the update if your Solr web server is already configured.
    The following list shows the available parameters with brief explanations of each. Examples can be seen in the following task, along with more-detailed descriptions of each parameter and when it is needed and not needed:The scripts validate the values that are provided for any mandatory parameters. If values for mandatory parameters are blank, the scripts do not proceed. The error message indicates which values must be specified. An example of such an error can be viewed in the following troubleshooting reference:Where search_server_config includes the following parameters that help automate updating the web server configuration for IBM HTTP Server:
    For Standard configurations, the feature enablement configures Solr with the following values:
    Solr configuration after enablement for Standard configurations
    Field Value
    Profile name ${instanceName}_solr
    Cell name ${instanceName}_search_cell
    Node name ${instanceName}_search_node
    Application name Search_instance_name
    Application server name solrServer
    Virtual host VH_${instanceName}_search
    Search virtual host port 3737
    Web server definition name solrWebserver
    Context root /solr
    Data source name WebSphere Commerce Search ${dbType} DataSource ${instanceName}
    JDBC provider name WebSphere Commerce Search ${dbType} JDBC Provider ${instanceName}
    Test URL http://web_server:3737/solr
    Search preview servlet port 3738
    SSL Enabled

    For more information about enabling WebSphere Commerce search store enhancements, see Enabling starter store enhancements.

  4. Ensure that the script runs successfully.
    If the script runs successfully:
    • SolarisLinuxAIXWindowsThe message BUILD SUCCESSFUL is displayed in the console and in the WC_installdir/instances/instance_name/logs/enablefoundation_timestamp.log file. For more information, see the WC_installdir/instances/instance_name/logs/enablefoundation_timestamp.log file.
    • For IBM i OS operating systemThe message BUILD SUCCESSFUL is displayed in the console and in the WC_instance_root/instances/instance_name/logs/enablefoundation_timestamp.log file.
    • WebSphere Commerce DeveloperThe message enableFeature.bat completed is displayed in the command window. For more information, see the WCDE_installdir\logs\enableFeature.log file.
  5. Configure the web server for the Solr application
    The following configuration options are available, depending on your web server and preferred update method:
    • WebSphere Commerce search deployment tasks include steps to manually update the web server configuration for IBM HTTP Server (IHS).
      This approach includes the following considerations:
      • You created the WebSphere Commerce search web server httpd.conf file.
      • A directive to listen on the search virtual host port is added.
      • The web server plug-in is installed on the web server host.
    • Alternatively, WebSphere Commerce search deployment tasks include steps to help automate updating the web server configuration for IBM HTTP Server (IHS). This automation is achieved by passing in more configuration parameters when you are running the enablement scripts.

    For configuring non-IHS web servers such as IIS and SunOne, consult the provided documentation to update the configuration.

  6. Restart the search server.
    1. Go to the following directory:
      • For IBM i OS operating systemSolarisLinuxAIXWAS_installdir/profiles/Solr_profiledir/bin
      • WindowsWAS_installdir\profiles\Solr_profiledir\bin
      Where Solr_profiledir is the directory that is created for the WebSphere Application Server profile that is used by a WebSphere Commerce search instance.
    2. Stop the server.
      • For IBM i OS operating systemSolarisLinuxAIX./stopServer.sh solrServer
      • WindowsstopServer.bat solrServer
    3. Start the server.
      • For IBM i OS operating systemSolarisLinuxAIX./startServer.sh solrServer
      • WindowsstartServer.bat solrServer
  7. Test your search deployment by going to the following URL:
    Note: Ensure that your search server is running.
    • WebSphere Commerce Developerhttp://localhost/solr/Default/select?q=*%3A*
    • SolarisLinuxAIXWindowshttp://localhost:3737/solr/Default/select?q=*%3A*
    If successful, you receive a response that resembles the following snippet:
    
    <response>
    -
    <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">140</int>
    -
    <lst name="params">
    <str name="q">*:*</str>
    </lst>
    </lst>
    <result name="response" numFound="0" start="0"/>
    </response> 
    
  8. If you are deploying WebSphere Commerce search on top of an earlier feature pack version, migrate WebSphere Commerce search.