Magento 2 Solr Bridge Installation Guide

I/ INSTALL SOLR SERVER/SERVICE

============================================

    1/ Make sure you have logged in as root

    

    2/ Create directory /usr/local/solrbridge:

        mkdir /usr/local/solrbridge

    

    3/ Change to /usr/local/solrbridge:

        cd /usr/local/solrbridge

        

    4/ Download JRE file and extract:

        wget https://solrbridge.com/resources/jre1.8.0_251.tar.gz ./

        tar -xvzf jre1.8.0_251.tar.gz

        

    5/ Download Solr file and extract:

        wget https://downloads.apache.org/lucene/solr/8.5.1/solr-8.5.2.tgz ./

        tar -xvzf solr-8.5.1.tgz

        

    6/ Install Solr as Service:

        /usr/local/solrbridge/solr-8.5.1/bin/install_solr_service.sh /usr/local/solrbridge/solr-8.5.2.tgz -n

        Note: -n tell Solr server not to start after service installed (because you do not set JRE path yet)

    

    7/ Set JRE(java run time environment) path:

        -Edit file /etc/default/solr.in.sh and search for #SOLR_JAVA_HOME="" after that line add:

             SOLR_JAVA_HOME="/usr/local/solrbridge/jre1.8.0_251"

        Note: make sure that this file path "/usr/local/solrbidge/jre1.8.0_251/bin/java" exist.

        

    8/ Adjust SOLR_JAVA_MEM:

        -Edit file /etc/default/solr.in.sh and search for #SOLR_JAVA_MEM="-Xms512m -Xmx512m" after that line add:

            SOLR_JAVA_MEM="-Xms4g -Xmx4g"

        Note: This adjustment depends on each individual server Memory. Read more explaination from link below:

        https://lucene.apache.org/solr/guide/6_6/taking-solr-to-production.html#...

        

    9/ Apply/Add Solrbridge configsets for Solr server

        Copy everything under Magento2_Solr_Bridge-2.3.9/vendor/solrbridge/src/library-solr/configsets/

        into /var/solr/data/configsets/

        Note: Magento2_Solr_Bridge-2.3.9 is the directory extracted from Solrbridge package file included in in Purchase Email Confirmation.

 

    10/ Change permission

        chown -R solr:solr /var/solr/data/configsets/

        

    11/ Start/Stop/Restart Solr service

        service solr start

    

 

II/ INSTALL MAGENTO 2 MODULES

============================================

 

STEP #1:

============

    * Download and extract file Magento2_Solr_Bridge_2.3.9.tar.gz

    * After extract you will have a directory structure as below:

        

        Magento2_Solr_Bridge_2.3.2

            vendor

            

    * Copy directory vendor into your Magento root and after that verify that you have a directory structure as below:

    

        <PATH TO YOUR MAGENTO ROOT>

            vendor/

                solrbridge/

                    src/

                        library-solr

                        module-search

                        module-layered-navigation

                        module-autocomplete

                    

STEP #2:

==============

    * Change directory to your Magento root

    * Execure the composer commands as below:

 

    composer config repositories.sb-lib-solr path ./vendor/solrbridge/src/library-solr

    composer config repositories.sb-module-search path ./vendor/solrbridge/src/module-search

    composer config repositories.sb-module-layered-nav path ./vendor/solrbridge/src/module-layered-navigation

    composer config repositories.sb-module-autocomplete path ./vendor/solrbridge/src/module-autocomplete

 

    composer require solrbridge/library-solr --no-update

    composer require solrbridge/module-search --no-update

    composer require solrbridge/module-layered-navigation --no-update

    composer require solrbridge/module-autocomplete --no-update

 

    composer update

 

    php bin/magento module:enable Solrbridge_Search Solrbridge_Autocomplete Solrbridge_LayeredNavigation

    php bin/magento setup:upgrade

    

#Backup document for Magento 1.x

https://solrbridge.com/documents/magento-solr-bridge-installation.html