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:
For this task, only the Embedded or Standard deployment options apply. See Deploy WebSphere Commerce search for more information.
- 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.
Before you begin
- Log on as the non-root user.
- Verify the test server is stopped and that Rational Application Developer is not running.
- Verify the 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 you have installed the following WebSphere Commerce Feature Pack:
- WebSphere Commerce Feature Pack 2
Procedure
- Complete one of the following tasks:
- Log on as a WebSphere Commerce non-root user.
- Log on with a user ID that is a member of the Windows Administration group.
- Navigate to the following directory:
- WC_INSTALL/bin
- WCDE_installdir\bin
- Start the server1 instance:
- ./startServer.sh server1
- startServer.bat server1
- Run the enablement script:
For enabling WebSphere Commerce search:
- config_ant.bat -buildfile WC_INSTALL/components/common/xml/enableFeature.xml -DinstanceName=instance -DfeatureName=foundation -DdbUserPassword=db_password [-DsolrHome = solrhome]
./config_ant.sh -buildfile WC_INSTALL/components/common/xml/enableFeature.xml \ -DinstanceName=instance -DfeatureName=foundation \ -DdbUserPassword=db_password \ [-DsolrHome = solrhome]
- 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.
- Verify the script runs successfully. If the script runs successfully:
- 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.
- The message enableFeature.bat completed is displayed in the command window. See the file WCDE_installdir\logs\enableFeature.log for additional information.
- 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.
- Update the Web server configuration:
- For IBM HTTP Server, open the configuration file httpd.conf
- Add: Listen host_name:3737
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.
- Restart the Web server.
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):
- Merge the Web server plugin files for both the WebSphere Commerce profile and the Solr profile:
- Copy the WebSphere Commerce plugin-cfg.xml file and rename it to plugin-cfg_backup.xml
- 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" ...
- Copy and append the located nodes to the plugin-cfg.xml file.
- Update the Web server configuration:
- For IBM HTTP Server, open the configuration file httpd.conf
- Add: Listen host_name:3737
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.
- Restart the Web server.
- Test the search deployment by navigating to the following URL:
Ensure the search server is running.
- http://localhost/solr/Default/select?q=*%3A*
- 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:
- Set up the WebSphere Commerce search index structure for a specific master catalog
- Preprocessing the WebSphere Commerce search index data
- Accept the WebSphere Commerce search index
You must consider reviewing the following task to secure the search server:
Related tasks
Deploy the WebSphere Commerce search server remotely (advanced deployment mode)
Deploy the WebSphere Commerce search server remotely (Developer)