You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Alfresco 4.0.e升级5.0.d:无前置Solr环境下的Solr安装方法(非向导)

Alright, let's walk through setting up Solr for your Alfresco 5.0.d community instance—since you're coming from a Lucene-based 4.0.e setup and using the archive package without the installation wizard, I'll break this down into actionable, step-by-step tasks.

Prerequisites to Check First

Before diving in, make sure you have these covered:

  • JDK 7: Alfresco 5.0.d requires Java 7 (either Oracle JDK 7 or OpenJDK 7; newer versions like JDK 8 may cause compatibility issues).
  • Memory Allocation: Reserve at least 1GB of heap for Solr, and adjust Alfresco's Tomcat heap to 2GB+ (depending on your server's total RAM).
  • Alfresco Stopped: Ensure your Alfresco 5.0.d instance is not running yet—we need to tweak configuration files first.

Get the Matching Solr Package

Alfresco doesn't work with generic Solr builds; you need the Alfresco-tailored Solr 4.10.4 package (the only version compatible with 5.0.d). Grab this from the same archive source where you got your Alfresco 5.0.d community package—it should be named something like alfresco-solr4-5.0.d.zip.

  • Unzip the Solr package to a directory alongside your Alfresco installation (e.g., if Alfresco lives in /opt/alfresco-5.0.d, put Solr in /opt/alfresco-solr4-5.0.d for clean path management).

Configure Alfresco to Use Solr

Next, we'll switch Alfresco from Lucene to Solr by updating its core configuration:

  1. Navigate to Alfresco's tomcat/shared/classes directory and open alfresco-global.properties.
  2. Comment out all Lucene-related lines (e.g., index.subsystem.name=lucene and any associated lucene.* properties).
  3. Add the following Solr 4 configuration block:
    # Solr 4 Index Configuration
    index.subsystem.name=solr4
    solr.host=localhost
    solr.port=8983 # Use this port if Alfresco is on the default 8080; adjust if needed
    solr.port.ssl=8443
    solr.base.url=/solr
    # Database connection (match your existing Alfresco DB config)
    db.driver=org.postgresql.Driver # Replace with your DB driver (MySQL, Oracle, etc.)
    db.url=jdbc:postgresql://localhost:5432/alfresco
    db.username=alfresco
    db.password=alfresco
    
  4. Save the file—Alfresco will now point to Solr for indexing.

Configure Solr to Connect to Alfresco

Now set up Solr to communicate with your Alfresco instance:

  1. Go to the Solr cores directory: alfresco-solr4-5.0.d/solr/cores. You'll see two cores: workspace-SpacesStore (live content) and archive-SpacesStore (archived content).
  2. For each core, open solrcore.properties and update these values:
    alfresco.host=localhost
    alfresco.port=8080 # Match your Alfresco Tomcat port
    alfresco.base.url=/alfresco
    # If using SSL (recommended for production), uncomment and configure these:
    # alfresco.secureComms=https
    # solr.ssl.keystore=../../keystore/ssl.keystore
    # solr.ssl.keystore.password=kT9X6oe68t
    # solr.ssl.truststore=../../keystore/ssl.truststore
    # solr.ssl.truststore.password=kT9X6oe68t
    
  3. Adjust Solr's heap size:
    • On Linux: Edit solr/bin/solr.in.sh and set SOLR_HEAP="1024m" (increase to 2GB if you have enough RAM).
    • On Windows: Edit solr/bin/solr.in.cmd and set set SOLR_HEAP=1024m.

Initialize and Rebuild the Index

Since you're migrating from Lucene, you can't reuse old indexes—you need to build fresh Solr indexes:

  1. Start Alfresco first: Launch its Tomcat instance and verify you can log in to the Alfresco Share interface (http://localhost:8080/share).
  2. Start Solr: Run the startup script from the Solr bin directory:
    • Linux: ./solr start -p 8983
    • Windows: solr start -p 8983
  3. Verify Solr is running: Access the Solr admin console at http://localhost:8983/solr—you should see both cores listed under "Core Admin".
  4. Trigger a full reindex:
    • Log into Alfresco as an admin, go to the Admin Console (http://localhost:8080/alfresco/service/enterprise/admin).
    • Navigate to Index Management > click Reindex All.
    • Wait for the process to complete (time depends on how much content you have—be patient for large repositories).

Verify the Setup

Once the reindex finishes, confirm everything works:

  • Run a few search queries in Alfresco Share—results should match your content.
  • Check Solr's logs (solr/logs/solr.log) for any errors or warnings.
  • Check Alfresco's Tomcat logs (tomcat/logs/catalina.out) to ensure no indexing-related issues are reported.

Optional: Enable SSL for Production

For production environments, enable SSL between Alfresco and Solr to secure index communication:

  1. Use Alfresco's built-in keystore tool to generate SSL certificates (or use your organization's existing certs).
  2. Update both alfresco-global.properties and Solr's solrcore.properties to use https for secure communication.
  3. Restart both Alfresco and Solr to apply the SSL settings.

内容的提问来源于stack exchange,提问作者Deepankar Kalita

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 10:45:19