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 deploySearch scripts. This script creates and deploys a separate search profile and web module on the same machine as the WebSphere Commerce profile.

WebSphere Commerce DeveloperNote: WebSphere Commerce Search is enabled by default in WebSphere Commerce Developer. Only complete this task in WebSphere Commerce Developer if you have disabled WebSphere Commerce Search. For example, if you have previously run the WCDE_installdir\bin\disableSolr.bat utility.

Before you begin

  • LinuxAIXEnsure 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 WebSphere Commerce Search enablement. If the web server certificate is not imported, store preview might result in SSL handshake errors.

Procedure

  1. Go to the following directory:
    • LinuxAIXWC_profiledir/bin
    • WindowsWC_profiledir\bin
  2. Start the server1 instance:
    • LinuxAIX./startServer.sh server1
    • WindowsstartServer.bat server1
  3. Go to the following directory:
    • WC_installdir/bin
    • WebSphere Commerce DeveloperWCDE_installdir\bin
  4. Run the WebSphere Commerce Search enablement script:
    • Windowsconfig_ant.bat -buildfile WC_installdir/components/foundation/subcomponents/search/deploy/deploySearch.xml -DinstanceName=instance_name -DdbUserPassword=db_password -DdbaPassword dbaPassword [search_server_config]
    • LinuxAIX./config_ant.sh -buildfile WC_installdir/components/foundation/subcomponents/search/deploy/deploySearch.xml -DinstanceName=instance_name -DdbUserPassword=db_password -DdbaPassword dbaPassword [search_server_config]
    • For IBM i OS operating system./config_ant.sh -buildfile WC_installdir/components/foundation/subcomponents/search/deploy/deploySearch.xml -DinstanceName=instance_name -DdbUserPassword=db_password -DdbaPassword dbaPassword [search_server_config]
    • WebSphere Commerce DeveloperenableSolr.bat
    Where:
    instance_name
    The name of the WebSphere Commerce instance with which you are working (for example, demo).
    db_password
    The WebSphere Commerce database user password.
    dbaPassword
    The WebSphere Commerce database administrator user password.
    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.

    The following list shows the available parameters with brief explanations of each. 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. 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 following parameters help automate updating the web server configuration for IBM HTTP Server:
    autoConfigSearchWebserver
    The flag that turns on or off the automation. It indicates whether to automatically configure the IHS web server. The default value is false.
    If set to false, or if not specified in the script, you must manually configure your search web server.
    isShareWCWebserverProduct
    Indicates whether the IHS server is shared with WebSphere Commerce. The default value is false.
    If set to true, the proceeding parameter values are automatically retrieved. However, you must specify the FTP password, as it is not typically stored on disk for security purposes.
    searchWebserverHostname
    The fully qualified host name for the WebSphere Commerce Search web server.
    searchWebserverOS
    Indicates which operating system is used on the search web server host.
    searchWebserverInstallLocation
    The WebSphere Commerce Search installation location.
    searchPluginInstallLocation
    The WebSphere Commerce Search plug-in installation location. This parameter is required when you use a separate IHS installation.
    searchRemoteConfigPath
    The path on the remote IHS machine where the WebSphere Commerce Search web server's file is stored.
    searchIsConfigViaFTP
    Indicates whether to transfer the configuration files over FTP.
    The FTP parameters include:
    searchFtpServerPort
    The WebSphere Commerce Search FTP server port.
    searchFtpUserId
    The WebSphere Commerce Search FTP user ID.
    searchFtpUserPwd
    The WebSphere Commerce Search FTP user password.
    searchIsConfigViaNFS
    Indicates whether to transfer the configuration files over a locally mapped or mounted drive.
    The mapped parameters are:
    searchMappedConfigPath
    The directory to which the search web server configuration files are copied.
    Files and directories are created under the searchMappedConfigPath/instance_name_solr directory.
    If you use NFS to transfer the web server file, ensure that the value of the searchMappedConfigPath parameter matches the value of the searchPluginInstallLocation parameter.
    Examples
    The following examples outline the typical scenarios when you configure the WebSphere Commerce search web server:
    Replace [search_server_config] in the command line with the following parameter if you are:
    • Not using the automated IHS web server configuration.
    
    -DautoConfigSearchWebserver=false
    
    Replace [search_server_config] in the command line with the following parameters if you are:
    • Using the automated IHS web server configuration,
    • Sharing the IHS from your WebSphere Commerce instance, and
    • Your IHS is local.
    
    -DautoConfigSearchWebserver=true -DisShareWCWebserverProduct=true
    
    Replace [search_server_config] in the command line with the following parameters if you are:
    • Using the automated IHS web server configuration,
    • Sharing the IHS from your WebSphere Commerce instance,
    • Your IHS is remote, and
    • Your WebSphere Commerce web server does not use FTP or NFS for remote configuration. Or your WebSphere Commerce web server uses NFS for remote configuration and the NFS mount is in place.
    
    -DautoConfigSearchWebserver=true -DisShareWCWebserverProduct=true
    
    Or, if your WebSphere Commerce web server uses FTP for remote configuration:
    
    -DautoConfigSearchWebserver=true -DisShareWCWebserverProduct=true -DsearchFtpUserPwd=your_FTP_password
    
    Where your_FTP_password is the password for the FTP server that is running on your IHS web server host.
    Or, when you want to ensure that FTP or NFS is not used for remote configuration:
    
    -DautoConfigSearchWebserver=true -DisShareWCWebserverProduct=true -DsearchIsConfigViaFTP=false -DsearchIsConfigViaNFS=false
    
    Replace [search_server_config] in the command line with the following parameters if you are:
    • Using the automated IHS web server configuration,
    • Using a separate IHS,
    • Your IHS is remote, and
    • You are not automatically transferring the files to the remote machine.
    
    -DautoConfigSearchWebserver=true -DisShareWCWebserverProduct=false 
    -DsearchWebserverHostname=yourSearchIHSHostName 
    -DsearchWebserverInstallLocation=thePathToIHSInstallDirOnYourSearchIHSHost 
    -DsearchPluginInstallLocation=thePathToPluginInstallDirOnYourSearchIHSHost 
    -DsearchRemoteConfigPath=pathWhereSearchIHSConfigFilesWillReside
    
    For Standard configurations, the WebSphere Commerce Search 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
  5. Ensure that the script runs successfully.
    If the script runs successfully:
    • LinuxAIXWindowsThe message BUILD SUCCESSFUL is displayed in the console and in the WC_installdir/instances/instance_name/logs/deploySearch_timestamp.log file. For more information, see the WC_installdir/instances/instance_name/logs/deploySearch_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/deploySearch_timestamp.log file.
    • WebSphere Commerce DeveloperThe message enableSolr.bat completed is displayed in the command window. For more information, see the WCDE_installdir\logs\enableSolr.log file.
  6. 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.

  7. Restart the search server.
    1. Go to the following directory:
      • LinuxAIXFor IBM i OS operating systemWAS_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.
      • LinuxAIXFor IBM i OS operating system./stopServer.sh solrServer
      • WindowsstopServer.bat solrServer
    3. Start the server.
      • LinuxAIXFor IBM i OS operating system./startServer.sh solrServer
      • WindowsstartServer.bat solrServer
  8. 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*
    • LinuxAIXWindowshttp://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> 
    
  9. If you are deploying WebSphere Commerce Search on top of an earlier version, migrate WebSphere Commerce Search.