0

I have many problems when installing Elasticsearch on my server. I'm going to put the steps that I followed in case someone can tell me if I'm missing something or not, please, or if I need to install something.

My system Ubuntu 18.04, Nginx 1.14.0, MySQL 5.7.25, Magento 2.3, PHP 7.1.26, Magento 2.3

I followed this link:

Install and configure Elasticsearch (devdocs.magento.com)

I have installed the Java Software Development Kit (JDK) with this steps:

sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get -y update
sudo apt-get install -y oracle-java8-installer

I have installed Elasticsearch 6.6 follow this steps:

sudo wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.0.deb
sudo wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.0.deb.sha512
sudo shasum -a 512 -c elasticsearch-6.6.0.deb.sha512 
sudo dpkg -i elasticsearch-6.6.0.deb
sudo rm elasticsearch-6.6.0.deb
sudo rm elasticsearch-6.6.0.deb.sha512
sudo vi /etc/elasticsearch/elasticsearch.yml
    network.host: localhost
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch
sudo systemctl start elasticsearch
curl -XGET "localhost:9200" ------> (everything works correctly)

Configure and run cron: With this step is enough? or should I create a specific cron job for reindexing?

php bin/magento cron:install

and then, to configure my nginx I followed this link:

Configure nginx and Elasticsearch (devdocs.magento.com)

Set up a proxy. Is this step necessary?

To create a new file /etc/nginx/conf.d/magento_es_auth.conf with the following contents

server {
    listen 8080;
    location / {
        proxy_pass http://localhost:9200;
    }
}

Next steps

service nginx restart
curl -i http://localhost:8080/_cluster/health ------> (everything works correctly)

I have configured Magento to use Elasticsearch. And it seems that everything works correctly.

Secure communication with nginx. Is this step necessary?

Can someone help me resolve my questions in bold? And to know if these are the passos necessary to install and configure Elasticsearch or if I need to do something else

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.