ELASTIC SEARCH – MAGENTO 2 COPYRIGHT 2018 MAGEDELIGHT.COM Page 2 of 6
Total Page:16
File Type:pdf, Size:1020Kb
Elasticsearch - Magento 2 INSTALLATION GUIDE MAGEDELIGHT.COM Installation: Before installing the extension, please make below notes complete: Backup your web directory and store database. Elasticsearch – M2 Installation: Install elasticsearch on your webserver, here is the reference link http://blog.magedelight.com/how-to- install-elasticsearch-on-centos-7-ubuntu-14-10-linux-mint-17-1/ Unzip the extension package file into the root folder of your Magento 2 installation. Install elastic search library o Back up your current composer.json cp composer.json composer.json.bk o Edit composer.json file and add below code to required clause. “elasticsearch/elasticsearch” : “~5.0” o Update dependencies composer update Connect to SSH console of your server: o Navigate to root folder of your Magento 2 setup o Run command php -f bin/magento module:enable Magedelight_Elasticsearch o Run command php -f bin/magento setup:upgrade o Run command php -f bin/magento setup:static-content:deploy Flush store cache; log out from the backend and log in again ELASTIC SEARCH – MAGENTO 2 COPYRIGHT 2018 MAGEDELIGHT.COM Page 2 of 6 License Activation: Note: This section is not applicable for extension purchased from Magento Marketplace How to activate the extension? Step 1: Go to Admin Control Panel >Stores > Configuration > Magedelight > Elasticsearch > License Configuration, you will see Serial Key and Activation key fields in License Configuration. Please enter the keys you received on purchase of the product and save configuration. Step 2: Expand “General Configuration” tab, you will find list of domains for which license is purchased and configured, now select the domain you are going to use, you can select multiple domain by clicking “Ctrl + Select”. Step 3: Now, select “Yes” from “Elastic Search Enabled” to enable extension and again click on “Save Config” button on top right. ELASTIC SEARCH – MAGENTO 2 COPYRIGHT 2018 MAGEDELIGHT.COM Page 3 of 6 Elasticsearch Installation on Ubuntu ## Ubuntu 14 | Linux Mint 17 ## #Install all the dependency for Elasticsearch. $ sudo apt-get install software-properties-common python-software-properties $ sudo apt-get install wget #Install OpenJDK. $ sudo add-apt-repository -y ppa:openjdk-r/ppa $ sudo apt-get update $ sudo apt-get install -y openjdk-8-jdk #Install Oracle JAVA 8. $ sudo add-apt-repository -y ppa:webupd8team/java $ sudo apt-get update $ sudo apt-get install -y oracle-java8-installer #Check java Version $ java -version #Install Elasticsearch version 5.x. ## Method 1 ## #Download and install the public signing key: $ wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - #Installing from the APT repository $ sudo apt-get install apt-transport-https $ echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/s ources.list.d/elastic-5.x.list #Install the Elasticsearch Debian package with: $ sudo apt-get update && sudo apt-get install elasticsearch ## Method 2 ## #Download and install the Debian package elasticsearch-5.6.0 manually. $ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.0.deb $ sudo dpkg -i elasticsearch-5.6.0.deb ELASTIC SEARCH – MAGENTO 2 COPYRIGHT 2018 MAGEDELIGHT.COM Page 4 of 6 Use the update-rc.d command to configure Elasticsearch to start automatically when the system boots up: $ sudo update-rc.d elasticsearch defaults 95 10 Elasticsearch can be started and stopped using the service command: $ sudo -i service elasticsearch start $ sudo -i service elasticsearch stop Manually start/stop service commands: $ sudo /etc/init.d/elasticsearch start $ sudo /etc/init.d/elasticsearch start Verify that Elasticsearch is working by entering the following command on the server on which it running: $ curl -X GET 'http://localhost:9200' $ curl -i http://localhost:9200/_cluster/health Elasticsearch Installation on Cent OS ## Cent OS 7 ## #Install all the dependency for Elasticsearch. yum install #Install JAVA-OpenJDK $ sudo yum install java-1.8.0-openjdk $ sudo yum install java-1.8.0-openjdk-devel #Install JAVA-oracle $ cd /opt $ wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.co m%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u 60-b27/jre-8u60-linux-x64.rpm" $ sudo yum localinstall jre-8u60-linux-x64.rpm #Check java Version $ java -version #Install Elasticsearch version 5.x. ## Method 1 ## #Import the Elasticsearch PGP Key $ rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch #Installing from the RPM repository. Create a file called elasticsearch.repo in the /etc/yum.re pos.d/ directory. [elasticsearch-5.x] name=Elasticsearch repository for 5.x packages baseurl=https://artifacts.elastic.co/packages/5.x/yum ELASTIC SEARCH – MAGENTO 2 COPYRIGHT 2018 MAGEDELIGHT.COM Page 5 of 6 gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md #now repository is ready for use to install Elasticsearch with the following command: $ sudo yum install elasticsearch ## Method 2 ## #Download and install the RPM manually. $ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.0.rpm $ sudo rpm --install elasticsearch-5.6.0.rpm Use the chkconfig command to configure Elasticsearch to start automatically when the system boots up: $ sudo sudo chkconfig --add elasticsearch Elasticsearch can be started and stopped using the service command: $ sudo -i service elasticsearch start $ sudo -i service elasticsearch stop Manually start/stop service commands: $ sudo /etc/init.d/elasticsearch start $ sudo /etc/init.d/elasticsearch start Verify that Elasticsearch is working by entering the following command on the server on which it running: $ curl -X GET 'http://localhost:9200' $ curl -i http://localhost:9200/_cluster/health ELASTIC SEARCH – MAGENTO 2 COPYRIGHT 2018 MAGEDELIGHT.COM Page 6 of 6 .