You are here

Installing Solr on JBoss 6 EAP with Java 8

Use this information to install Solr on the same JBoss 6 instance on which Alfresco is installed.
Ensure that JBoss and Java 8 are installed. Review the Supported Platforms page on the Support Portal for more information.
The following instructions:
  • Are only for Solr 1 installation; the Solr 4 server is only supported when running in a Tomcat application server.
  • Assume that you know the path of the JBoss directory, which is represented as <JBOSS_EAP_HOME>.
  • Are written for Windows Server 2008 R2 installation with MySQL as data source. More details for JBoss 6 EAP configuration could be found in the JBoss Enterprise Application Platform 6 guide.

Before installing Solr, ensure that:

  • Alfresco has been deployed on JBoss EAP 6.
  • JBoss server is not running.
The following instructions use <ALF_DATA> to refer to the value of the dir.root property, which specifies the directory where the content and indexes are stored.
  1. Browse to the Alfresco Support Portal.
  2. Download the file.
  3. Create a temporary directory (the path for it is represented as <TEMP>) and uncompress the zip file here.
  4. Create a JBoss module with Solr configuration.
    1. Create a main directory at <JBOSS_EAP_HOME>\modules\org\apache\solr\configuration\.
    2. Copy the contents of <TEMP> to the <JBOSS_EAP_HOME>\modules\org\apache\solr\configuration\main directory. Do not copy the contents of the alf_data directory.
    3. Copy the contents of <TEMP>\alf_data to <ALFRESCO_HOME>/ALF_DATA directory.
    4. Add the following properties to the file:
    5. Create the module.xml file at <JBOSS_EAP_HOME>\modules\org\apache\solr\configuration\main\ with the following content:

      <?xml version="1.0" encoding="UTF-8"?>
       <module xmlns="urn:jboss:module:1.0" name="org.apache.solr.configuration">
           <resource-root path="."/>
    6. Add the following system properties to the <JBOSS_EAP_HOME>\standalone\configuration\standalone.xml file:

        <property name="solr.solr.home" value="<JBOSS_EAP_HOME>\modules\org\apache\solr\configuration\main" />
        <property name="" value="<SOLR_DATA>" />

      where <SOLR_DATA> is the directory where indexes would be stored.

    7. Generate certificates that will be used for Solr and Alfresco communication. The <ALF_DATA>\keystore\generate_keystores.bat can be used, the only requirement is to use JKS keystores and truststores, as JBoss does not support JCEKS.
    8. Replace the existing certificates with the newly generated certificates at the following locations:

      • <ALF_DATA>\keystore to <JBOSS_EAP_HOME>\modules\org\apache\solr\configuration\main\archive-SpacesStore\conf
      • <ALF_DATA>\keystore to <JBOSS_EAP_HOME>\modules\org\apache\solr\configuration\main\workspace-SpacesStore\conf
    9. Modify the following property files with the new certificate properties:

      • <JBOSS_EAP_HOME>\modules\org\apache\solr\configuration\main\archive-SpacesStore\conf\
      • <JBOSS_EAP_HOME>\modules\org\apache\solr\configuration\main\workspace-SpacesStore\conf\
    10. Add SSL connector to the web subsystem in the <JBOSS_EAP_HOME>\standalone\configuration\standalone.xml file.

      <subsystem xmlns="urn:jboss:domain:web:1.5" default-virtual-server="default-host" native="false">
        <connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" secure="true">
           <ssl name="ssl" key-alias="ssl.repo" password="kT9X6oe68t" certificate-key-file="<ALF_DATA>\keystore\ssl.keystore" protocol="TLSv1" verify-client="true"
              ca-certificate-file="<ALF_DATA>\keystore\ssl.truststore" keystore-type="JKS"
    11. Create the file in the <ALF_DATA>\keystore directory with the following content:


      where, REPO_CERT_DNAME specifies the repository server certificate subject name, and SOLR_CLIENT_CERT_DNAME specifies the Solr client certificate subject name.

      For example, if the following certificate subject names are used:

      REPO_CERT_DNAME="CN=Alfresco Repository, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB"
      SOLR_CLIENT_CERT_DNAME="CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB"
      then contents of the file should be:
      CN\=Alfresco\ Repository\ Client,\ OU\=Unknown,\ O\=Alfresco\ Software\ Ltd.,\ L\=Maidenhead,\ ST\=UK,\ C\=GB=repoclient
      CN\=Alfresco\ Repository,\ OU\=Unknown,\ O\=Alfresco\ Software\ Ltd.,\ L\=Maidenhead,\ ST\=UK,\ C\=GB=repository
    12. Add a security domain in the security subsystem in <JBOSS_EAP_HOME>\standalone\configuration\standalone.xml:

      <subsystem xmlns="urn:jboss:domain:security:1.2">
         <security-domain name="trustStore">
            <jsse truststore-password="kT9X6oe68t" truststore-type="JKS" truststore-url="<ALF_DATA>\keystore\ssl.truststore" protocols="TLSv1"/>
         <security-domain name="alfresco" cache-type="default">
              <login-module code="CertificateRoles" flag="required">
                <module-option name="securityDomain" value="java:/jaas/trustStore"/>
                <module-option name="verifier" value=""/>
                <module-option name="rolesProperties" value="<ALF_DATA>\keystore\"/>
      Note: Remember to replace <ALF_DATA> with an actual path.
    13. Rename the WAR file to solr.war in the <JBOSS_EAP_HOME>\modules\org\apache\solr\configuration\main directory.
    14. Unzip solr.war and update the WEB-INF\jboss-deployment-structure.xml file as shown below:

      <?xml version="1.0" encoding="UTF-8"?>
            <module name="org.apache.solr.configuration"/>
      Also, modify the WEB-INF\jboss-web.xml file with the following content:
      <?xml version='1.0' encoding='UTF-8'?>
      <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 4.2//EN" "">
    15. Unzip the alfresco-enterprise-5.1.5.ear\alfresco.war file and add the security domain to WEB-INF\jboss-web.xml:

      <?xml version='1.0' encoding='UTF-8'?>
      <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 4.2//EN" "">
    16. Re-compress the Alfresco WAR and alfresco-enterprise-5.1.5.ear files.
    17. Start the standalone JBoss Web Server.
    18. Redeploy the modified Alfresco EAR file as shown is Step 14 of Configuring JBoss for Alfresco.
  5. Deploy the Solr WAR.
    1. Open the JBoss Management Console.
    2. Navigate to Runtime > Manage Deployments.
    3. Click the Add button.
    4. Browse and select the modified Solr WAR file.
    5. After the WAR file is added, click the Enable button.

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.