magento2 – How to configuration Elasticsearch in centOS 7 server for Magento 2.4


I want to configuration Elasticsearch in centOS 7 server for Magento 2.4. I have install Elasticsearch but not sure it is install or not.Because I have run this command sudo -i service elasticsearch start show below error :-

error: permission denied on key 'vm.max_map_count'
Starting elasticsearch: 
ERROR: The JDK bundled with Elasticsearch requires glibc >= 2.14, but
you have version 2.12. Please set the JAVA_HOME environment variable
to point to a working JDK installation. For more information, see:

https://www.elastic.co/support/matrix#matrix_jvm

enter image description here

Please Share me your suggestion.How to solve this error.

THANKS.