Kategorie: DirectAdminLinux

Elasticsearch installation on the server vps DA

As the need arose recently elasticsearch installation and it is not too demanding decided to describe how we can make the installation in a few very simple steps.

So let's get started.

All software requires a minimum version of Java 1.7 So at the beginning we will update the repo and install java.

System update:

yum update

java installation a lot:

yum install java-1.8.0-openjdk.x86_64

If everything went ok after entering the command java -version You should get :

openjdk version "1.8.0_65"
OpenJDK Runtime Environment (build 1.8.0_65-b17)
OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)

then we grab the key and create a repository elasticsearch

rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
nano /etc/yum.repos.d/Elasticsearch.repo

/etc/yum.repos.d/Elasticsearch.repo file should have a content:

[elasticsearch-2.x]
name=Elasticsearch repository for 2.x packages
baseurl=http://packages.elastic.co/elasticsearch/2.x/centos
gpgcheck=1
gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
enabled=1

We do instlacji:

yum -y install elasticsearch
chkconfig --add elasticsearch

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

nano /etc/elasticsearch/elasticsearch.yml

and change:

# ------------------------------------ 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

# ---------------------------------- 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:
# 

Then, from commenting 2 options:

network.host: IPSERWERA and give your server ip and vps

http.port: 9200 – jest to port pod którym widzimy elasticsearch w internecie

after making these changes we can save and run the script.

service elasticsearch start

If everything goes correctly at IPSERWERA:9200 we should see something like this:

{
  "name" : "node-1",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "YYRBLSq4SH2CVVkn1U4Fxw",
  "version" : {
    "number" : "2.4.6",
    "build_hash" : "5376dca9f70f3abef96a77f4bb22720ace8240fd",
    "build_timestamp" : "2017-07-18T12:17:44WITH",
    "build_snapshot" : false,
    "lucene_version" : "5.5.4"
  },
  "tagline" : "You Know, for Search"
}

Everything works perfectly fine 🙂

If you do not see SRON must add a port 9200 do allow firewalla.

Linux

Udostępnij
Opublikowane przez
Linux

Recent posts

KeePass2 2.52 w Ubuntu 22.04

The guide below describes how to install KeePass on Ubuntu. Całość wykonamy za pomocą kilku poleceń

2 years temu

Installing Master PDF editor in Ubuntu 22.04

Master PDF Editor is a comprehensive PDF program, which includes many features. Oprócz tworzenia i edycji

2 years temu

iotop - memory monitoring

Iotop jest prostym narzędziem dla systemów Uniksowych umożliwiającym monitorowanie użycia dowolnego nośnika pamięci flash/hdd/ssd w

2 years temu

Run multiple commands in one cron job

You can separate two or more commands with semicolons (;), Semicolon (;): służy do oddzielania

2 years temu

Changing the exif data of a photo in the Linux terminal

Poniższy poradnik opisuje w jaki sposób za pomocą konsoli możemy dokonać edycji danych zdjęcia exif.

2 years temu

Installing Rocket.Chat Server on Rocky Linux 8

The following guide describes how to install Rocket.Chat on Rocky Linux 8 Całość bardzo prosto zainstalujemy

2 years temu