Administer > Administering WebSphere Commerce search > Deploy WebSphere Commerce search > Deploying the WebSphere Commerce search server


Deploy the WebSphere Commerce search server locally (standard deployment mode)

You can deploy the search server on the WebSphere Commerce server by running the feature enablement scripts. This script deploys the search server locally, depending on the environment.

The following deployment options are available:

WebSphere Commerce Developer Embedded

Deploys search as part of the WebSphere Commerce Application.

Standard

Creates and deploys a separate search profile and Web module on the same machine as the WebSphere Commerce profile.

Advanced

Prepares the deployment package to copy and run the deployment scripts on a remote search machine, where a search profile and Web module is deployed.
For this task, only the Embedded or Standard deployment options apply. See Deploy WebSphere Commerce search for more information.


Before you begin

Ensure that you have installed the following WebSphere Commerce Feature Pack:


Procedure

  1. Complete one of the following tasks:

    • AIXLinuxSolaris Log on as a WebSphere Commerce non-root user.

    • Windows Log on with a user ID that is a member of the Windows Administration group.

  2. Navigate to the following directory:

  3. Start the server1 instance:

    • AIXLinuxSolaris ./startServer.sh server1

    • Windows startServer.bat server1

  4. Run the enablement script:

    For enabling WebSphere Commerce search:

    • Windows config_ant.bat -buildfile WC_INSTALL/components/common/xml/enableFeature.xml -DinstanceName=instance -DfeatureName=foundation -DdbUserPassword=db_password [-DsolrHome = solrhome]

    • AIXLinuxSolaris
      ./config_ant.sh -buildfile WC_INSTALL/components/common/xml/enableFeature.xml \
                      -DinstanceName=instance -DfeatureName=foundation \
                      -DdbUserPassword=db_password \
                     [-DsolrHome = solrhome]
      

    • WebSphere Commerce Developer enableFeature.bat -DfeatureName=foundation [-DsolrHome = solrhome]

    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 solr
    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

    For enabling WebSphere Commerce search store enhancements, see Enable starter store enhancements for more information.

  5. Verify the script runs successfully. If the script runs successfully:

    • AIXLinuxSolarisWindows The message BUILD SUCCESSFUL is displayed in the console and in the WC_INSTALL/instances/instance/logs/enablefoundation_timestamp.log file. See the file WC_INSTALL/instances/instance/logs/enablefoundation_timestamp.log for additional information.

    • WebSphere Commerce Developer The message enableFeature.bat completed is displayed in the command window. See the file WCDE_installdir\logs\enableFeature.log for additional information.

  6. AIXLinuxSolarisWindows Configure the Web server for the Solr application. The Solr application must use a separate Web server; therefore, configure another Web server and point it to the Solr profile plugin file. Note that the configuration steps do not include the steps for configuring non-IHS Web servers such as IIS and SunOne. For other types of Web servers, consult the provided documentation to update the configuration accordingly.

    It is possible to configure the Solr application to share the same Web server with the WebSphere Commerce application; however, this configuration is suitable only when to quickly set up an informal testing environment. This configuration is not suitable for formal test or production environments because there is a risk that the Solr server will stop working under certain circumstances. When setting up this shared configuration, manually merge the Web server plugin files (plugin-cfg.xml) for the WebSphere Commerce profile and the Solr profile. Each time the WebSphere Application Server regenerates the Web server plugin file, the manual merge is overridden and the Solr server stops working. For example, the WebSphere Application Server regenerates the Web server plugin file when you install an interim fix (iFix). To get the Solr server working again, redo the manual merge.

    To configure an informal testing environment in which the Solr application shares the same WebServer with the WebSphere Commerce application (not suitable for formal test or production environments):

    1. Merge the Web server plugin files for both the WebSphere Commerce profile and the Solr profile:

      1. Copy the WebSphere Commerce plugin-cfg.xml file and rename it to plugin-cfg_backup.xml

      2. Locate the Solr plugin-cfg.xml file, and locate the nodes shown as follows:

        <VirtualHostGroup Name="VH_demo_search">  ...
        </VirtualHostGroup> <ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" ...
         ...
        </ServerCluster> 
        <UriGroup Name="VH_demo_search_solrServer_demo_search_node_Cluster_URIs">  ...
        </UriGroup> <Route ServerCluster="solrServer_demo_search_node_Cluster" UriGroup="VH_demo_search_solrServer_demo_search_node_Cluster_URIs" ...
        

      3. Copy and append the located nodes to the plugin-cfg.xml file.

    2. Update the Web server configuration:

      1. For IBM HTTP Server, open the configuration file httpd.conf

      2. Add: Listen host_name:3737

      3. The following snippet is a sample update to the httpd.conf file:

        WebSpherePluginConfig "/opt/WebSphere/AppServer/profiles/demo/config/cells/WC_demo_cell/nodes/WC_demo_node/servers/webserver1/plugin-cfg.xml"
        Listen host_name:80
        Listen host_name:443
        Listen host_name:8000
        Listen host_name:8002
        Listen host_name:8004
        Listen host_name:8006
        Listen host_name:8007
        Listen host_name:3737 
        

        See Map multiple profiles to a single IBM HTTP Server for more information.

      4. Restart the Web server.

  7. Test the search deployment by navigating to the following URL:

    Ensure the search server is running.

    • WebSphere Commerce Developer http://localhost/solr/Default/select?q=*%3A*

    • AIXLinuxSolarisWindows http://localhost:3737/solr/Default/select?q=*%3A*

    If successful, you should receive a response resembling 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> 
    


What to do next

After deploying your search server, perform the following tasks:

You must consider reviewing the following task to secure the search server:


Related tasks

Feature Pack 2 Deploy the WebSphere Commerce search server remotely (advanced deployment mode)

Feature Pack 2 Deploy the WebSphere Commerce search server remotely (Developer)


+

Search Tips   |   Advanced Search