From 384fbd7f1ee2146dd3fcff06b997f02305156a01 Mon Sep 17 00:00:00 2001 From: Kaimbacher Date: Thu, 28 Jul 2022 09:42:17 +0000 Subject: [PATCH] Update 'Install_Configure_ElasticSearch' --- Install_Configure_ElasticSearch.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Install_Configure_ElasticSearch.md b/Install_Configure_ElasticSearch.md index 52acf43..c46743f 100644 --- a/Install_Configure_ElasticSearch.md +++ b/Install_Configure_ElasticSearch.md @@ -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 + + spring.profiles.active + es + +```