0

I have two projects one project requires ElasticSearch 7 and another requires ElasticSearch 6. Is there any way I can install both of these versions? That would be fine if I need to stop one version before starting another version.

1 Answers1

0

A little bit too late, but probably someone was looking for the same issue :)

Please note that below is my own config and you need to adjust it for your system\folders\etc.


Download and unpack the repo (you can google for the actual latest release versions):

cd ~
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.8.23.tar.gz
tar -zxf elasticsearch-6.8.23.tar.gz

If you run ES 7 already, make sure you have stopped it (!) and edited configs and set up different cluster\node names.

For example, edit ES 7 as the main node\cluser:

sudo nano /etc/elasticsearch/elasticsearch.yml

I added this config at the very bottom:

cluster.name: elastic_cluster1
node.name: node-1
node.master: true
node.data: true
transport.host: localhost
transport.tcp.port: 9300
http.port: 9200
network.host: 0.0.0.0

After that edit config for ES 6:

nano ~/elasticsearch-6.8.23/config/elasticsearch.yml

And put that at the very bottom:

cluster.name: elastic_cluster2
node.name: node-2
#node.master: true
node.data: true
transport.host: localhost
transport.tcp.port: 9304
http.port: 9204
network.host: 0.0.0.0

Now you just need to run ES 6 as a standalone version\process:

~/elasticsearch-6.8.23/bin/elasticsearch -d > /var/log/elasticsearch6.log &

So far all should be done. ES 7 and ES 6 are set up on different clusters and ports.

Use 9200 for v7 and 9204 for v6.

StasGrin
  • 101