Update 'Install_Configure_ElasticSearch'

Kaimbacher 2022-07-28 09:42:17 +00:00
parent 33dcbc6e53
commit 384fbd7f1e

@ -16,7 +16,7 @@ Next, update your package lists so APT will read the new Elastic source:
`sudo apt update`
Then install Elasticsearch with this command:
sudo apt install elasticsearch
`sudo apt install 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.
@ -97,3 +97,24 @@ $ curl -H 'Content-Type: application/json' -X PUT http://localhost:9200/gn-recor
$ 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
```
# STEP 5 - Check installation
Access Elasticsearch admin page from http://localhost:9200/
# Step 6 - Configure connect
Update Elasticsearch URL in 'WEB-INF/config.properties':
```
sudo nano work/jetty-0_0_0_0-8080-geonetwork_war-_geonetwork-any-/webapp/WEB-INF/config.properties
es.url=http://127.0.0.1:9200ion
```
add es to the spring.profiles.active in 'WEB-INF/web.xml'` to activate it and restart the application:
`sudo nano work/jetty-0_0_0_0-8080-geonetwork_war-_geonetwork-any-/webapp/WEB-INF/web.xml`
``` bash
<context-param>
<param-name>spring.profiles.active</param-name>
<param-value>es</param-value>
</context-param>
```