受欢迎的博客标签

 

https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html#deb

 

step 1:Import the Elasticsearch PGP Key

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

 

Checking that Elasticsearch is running

wget http://localhost:9200

output:

{
  "name" : "iZuf6hn15mpmrtypv9ltogZ",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "9MRok0MvR62qtdbi8X3PBQ",
  "version" : {
    "number" : "7.4.2",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "2f90bbf7b93631e52bafb59b3b049cb44ec25e96",
    "build_date" : "2019-10-28T20:40:44.881551Z",
    "build_snapshot" : false,
    "lucene_version" : "8.2.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

 

 

sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service

sudo systemctl start elasticsearch.service
sudo systemctl stop elasticsearch.service

sudo systemctl restart elasticsearch.service

sudo systemctl status elasticsearch.service

 

see the messages logged by the Elasticsearch service you can use the command below:

sudo journalctl -u elasticsearch
sudo journalctl -xe

 

 

Directory layout of Debian packageedit

The Debian package places config files, logs, and the data directory in the appropriate locations for a Debian-based system:

Type Description Default Location Setting

home

Elasticsearch home directory or $ES_HOME

/usr/share/elasticsearch

 

bin

Binary scripts including elasticsearch to start a node and elasticsearch-plugin to install plugins

/usr/share/elasticsearch/bin

 

conf

Configuration files including elasticsearch.yml

/etc/elasticsearch

ES_PATH_CONF

conf

Environment variables including heap size, file descriptors.

/etc/default/elasticsearch

 

data

The location of the data files of each index / shard allocated on the node. Can hold multiple locations.

/var/lib/elasticsearch

path.data

jdk

The bundled Java Development Kit used to run Elasticsearch. Can be overridden by setting the JAVA_HOME environment variable in /etc/default/elasticsearch.

/usr/share/elasticsearch/jdk

 

logs

Log files location.

/var/log/elasticsearch

path.logs

plugins

Plugin files location. Each plugin will be contained in a subdirectory.

/usr/share/elasticsearch/plugins

 

repo

Shared file system repository locations. Can hold multiple locations. A file system repository can be placed in to any subdirectory of any directory specified here.

Not configured

path.repo

Directory structure  on  Ubuntu.

Configuration files:

/etc/elasticsearch/elasticsearch.yml
/etc/elasticsearch/jvm.options