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.
Note: 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
- Ensure that you are logged on as the WebSphere Commerce non-root user.
- Log on with a user ID that is a member of the Windows Administration group.
- Ensure that you are logged on as a user that has *SECOFR authority.
- Ensure 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
-
Go to the following directory:
- WC_profiledir/bin
- WC_profiledir\bin
-
Start the server1 instance:
- ./startServer.sh server1
- startServer.bat server1
-
Go to the following directory:
- WC_installdir/bin
- WCDE_installdir\bin
-
Run the WebSphere Commerce Search enablement script:
- config_ant.bat -buildfile WC_installdir/components/foundation/subcomponents/search/deploy/deploySearch.xml -DinstanceName=instance_name -DdbUserPassword=db_password -DdbaPassword dbaPassword [search_server_config]
- ./config_ant.sh -buildfile WC_installdir/components/foundation/subcomponents/search/deploy/deploySearch.xml -DinstanceName=instance_name -DdbUserPassword=db_password -DdbaPassword dbaPassword [search_server_config]
- ./config_ant.sh -buildfile WC_installdir/components/foundation/subcomponents/search/deploy/deploySearch.xml -DinstanceName=instance_name -DdbUserPassword=db_password -DdbaPassword dbaPassword [search_server_config]
- enableSolr.bat
- 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.
- 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.
- isShareWCWebserverProduct
- Indicates whether the IHS server is shared with WebSphere Commerce. The default value is false.
- 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.
- searchIsConfigViaNFS
- Indicates whether to transfer the configuration files over a locally mapped or mounted drive.
- 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:
Where your_FTP_password is the password for the FTP server that is running on your IHS web server host.-DautoConfigSearchWebserver=true -DisShareWCWebserverProduct=true -DsearchFtpUserPwd=your_FTP_password
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 -
Ensure that the script runs successfully.
If the script runs successfully:
- The 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.
- The message BUILD SUCCESSFUL is displayed in the console and in the WC_instance_root/instances/instance_name/logs/deploySearch_timestamp.log file.
- The message enableSolr.bat completed is displayed in the command window. For more information, see the WCDE_installdir\logs\enableSolr.log file.
-
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.
- WebSphere Commerce Search deployment tasks include steps to manually update the web server
configuration for IBM HTTP Server (IHS).
-
Test your search deployment by going to the following URL:
Note: Ensure that your search server is running.
- http://localhost/solr/Default/select?q=*%3A*
- http://localhost:3737/solr/Default/select?q=*%3A*
<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>
- If you are deploying WebSphere Commerce Search on top of an earlier version, migrate WebSphere Commerce Search.