Update 'Install_Configure_ElasticSearch'
parent
dcd6e1d8d7
commit
8536ff2002
|
@ -2,7 +2,7 @@ Elasticsearch is a platform for distributed search and analysis of data in real
|
|||
|
||||
This article will guide you through installing Elasticsearch, configuring it for your use case, securing your installation, and beginning to work with your Elasticsearch server.
|
||||
|
||||
# Step 1: Installing Elasticsearch
|
||||
# Step 1 - Installing Elasticsearch
|
||||
To begin, use cURL, the command line tool for transferring data with URLs, to import the Elasticsearch public GPG key into APT. Note that we are using the arguments -fsSL to silence all progress and possible errors (except for a server failure) and to allow cURL to make a request on a new location if redirected. Pipe the output to the gpg --dearmor command, which converts the key into a format that apt can use to verify downloaded packages.
|
||||
|
||||
`curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elastic.gpg`
|
||||
|
@ -18,7 +18,7 @@ Next, update your package lists so APT will read the new Elastic source:
|
|||
Then install Elasticsearch with this command:
|
||||
sudo apt install elasticsearch
|
||||
|
||||
# Step2: Configuring ElasticSearch
|
||||
# Step2 - Configuring ElasticSearch
|
||||
o configure Elasticsearch, we will edit its main configuration file elasticsearch.yml where most of its configuration options are stored. This file is located in the /etc/elasticsearch directory.
|
||||
|
||||
`sudo nano /etc/elasticsearch/elasticsearch.yml`
|
||||
|
@ -56,7 +56,7 @@ Let's create a new file called 'memory.options' in the 'jvm.options.d' directory
|
|||
|
||||
`sudo systemctl restart elasticsearch`
|
||||
|
||||
# Step 3- Securing ElasticSearch
|
||||
# Step 3 - Securing ElasticSearch
|
||||
By default, Elasticsearch can be controlled by anyone who can access the HTTP API. This is not always a security risk because Elasticsearch listens only on the loopback interface (that is, 127.0.0.1), which can only be accessed locally. Thus, no public access is possible and as long as all server users are trusted, security may not be a major concern.
|
||||
|
||||
If you need to allow remote access to the HTTP API, you can limit the network exposure with Ubuntu’s default firewall, UFW.
|
||||
|
@ -84,3 +84,16 @@ To Action From
|
|||
9200 ALLOW 198.51.100.0
|
||||
...
|
||||
```
|
||||
|
||||
# Step 4 - Load GeoNetwork indices
|
||||
``` bash
|
||||
$ cd /tmp
|
||||
$ curl -O https://raw.githubusercontent.com/geonetwork/core-geonetwork/3.12.x/es/config/features.json
|
||||
$ curl -H 'Content-Type: application/json' -X PUT http://localhost:9200/gn-features -d @features.json
|
||||
|
||||
$ curl -O https://raw.githubusercontent.com/geonetwork/core-geonetwork/3.12.x/es/config/records.json
|
||||
$ curl -H 'Content-Type: application/json' -X PUT http://localhost:9200/gn-records -d @records.json
|
||||
|
||||
$ curl -O https://raw.githubusercontent.com/geonetwork/core-geonetwork/3.12.x/es/config/searchlogs.json
|
||||
$ curl -H 'Content-Type: application/json' -X PUT http://localhost:9200/gn-searchlogs -d @searchlogs.json
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue
Block a user