Installation Elasticsearch 6.x server vps DA
Some time ago I described Elasticsearch installation in version 2.x today guide on how to install it in version 6.x
Let's get started!
At the beginning of the standard Java installation:
1 | yum install java-1.8.0-openjdk-devel |
You can check the version of the java command:
1 | java -version |
You will get something like this:
1 2 3 | openjdk version "1.8.0_201" OpenJDK Runtime Environment (build 1.8.0_201-b09) OpenJDK 64-Bit Server VM (build 25.201-b09, mixed mode) |
Elastica key charge
1 | sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch |
we create a repository:
1 | nano /etc/yum.repos.d/elasticsearch.repo |
The content:
1 2 3 4 5 6 7 8 | [elasticsearch-6.x] name=Elasticsearch repository for 6.x packages baseurl=https://artifacts.elastic.co/packages/6.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md |
we make install :
1 | yum install elasticsearch |
run service:
1 2 | sudo systemctl enable elasticsearch.service sudo systemctl start elasticsearch.service |
It remained practically the whole work we made some editing in the same configuration elasticsearch we released it to the world.
We do edit the file /etc / elasticsearch / elasticsearch.yml
1 | nano /etc/elasticsearch/elasticsearch.yml |
and change:
1 2 3 4 5 6 7 8 9 10 11 | # ------------------------------------ Node ------------------------------------ # # Use a descriptive name for the node: # node.name: node-1 # # Add custom attributes to the node: # #node.rack: r1 # # ----------------------------------- Paths ------------------------------------ |
node.name: node 1 should be commented on.
next
1 2 3 4 5 6 7 8 9 10 11 12 | # ---------------------------------- Network ----------------------------------- # # Set the bind address to a specific IP (IPv4 or IPv6): # network.host: IPSERWERA # # Set a custom port for HTTP: # http.port: 9200 # # For more information, see the documentation at: # <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html> |
Then, from commenting 2 options:
network.host: IPSERWERA and give your server ip and vps
http.port: 9200 – it is a port in which we see on the web elasticsearch
after making these changes we can save and run the script.
1 | service elasticsearch start |
If everything goes correctly at IPSERWERA:9200 we should see something like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | { "name" : "node-1", "cluster_name" : "elasticsearch", "cluster_uuid" : "v84rLjnsR5WpbiYapg7-Dg", "version" : { "number" : "6.8.1", "build_flavor" : "default", "build_type" : "rpm", "build_hash" : "1fad4e1", "build_date" : "2019-06-18T13:16:52.517138Z", "build_snapshot" : false, "lucene_version" : "7.7.0", "minimum_wire_compatibility_version" : "5.6.0", "minimum_index_compatibility_version" : "5.0.0" }, "tagline" : "You Know, for Search" } |
Everything works perfectly fine 🙂
If you do not see SRON must add a port 9200 do allow firewalla.