Elasticsearch
Jump to navigation
Jump to search
Install Elastic Search 8
Install Java
yum install java - - - - - - - - - - - - - - - - - - - - - - - - - - OR FOR THE CURRENT LATEST VERSION: yum install java-1.8.0-openjdk.x86_64
To verify your JRE is installed and can be used, run the command:
java -version
Downloading and Installing Elasticsearch:
sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
Add Repo
sudo vi /etc/yum.repos.d/elasticsearch.repo [elasticsearch-6.x] name=Elasticsearch repository for 6.x packages baseurl=https://artifacts.elastic.co/packages/6.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md
Install ElasticSearch
yum install elasticsearch
Once Elasticsearch is finished installing, open its main configuration file, elasticsearch.yml, in your editor:
vi /etc/elasticsearch/elasticsearch.yml Change the following: network.host: localhost
Running Elasticsearch As A Service:
/bin/systemctl daemon-reload /bin/systemctl enable elasticsearch.service /bin/systemctl start elasticsearch.service /bin/systemctl status elasticsearch.service
Check ElasticSearch Version
/usr/share/elasticsearch/bin/elasticsearch --version
Errors and Solutions
org.elasticsearch.ElasticsearchSecurityException: invalid configuration for xpack.security.transport.ssl - [xpack.security.transport.ssl.enabled] is not set, but the following settings have been configured in elasticsearch.yml : [xpack.security.transport.ssl.keystore.secure_password,xpack.security.transport.ssl.truststore.secure_password]
To fix the above, run the following:
rm /etc/elasticsearch/elasticsearch.keystore /usr/share/elasticsearch/bin/elasticsearch-keystore create