Install Elasticsearch on CentOS


Andy

Administrator
Staff member
Elasticsearch is built using Java, and includes a bundled version of OpenJDK from the JDK maintainers (GPLv2+CE) within each distribution. This mean you don't have to install Java before installing Elasticsearch.

Source: https://www.elastic.co/guide/en/elasticsearch/reference/current/setup.html

After you install Elasticsearch, you can check which version of Java was installed by using this command:

java -version

1581401007502.jpg


Latest version is:

openjdk version "1.8.0_242"
 
  • Like
Reactions: RC

Andy

Administrator
Staff member
Installing Elasticsearch on CentOS

See this document for instructions:

https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html

1581548126322.jpg


Once Elasticsearch is installed you will need to execute the following command:

systemctl daemon-reload

To stop Elasticsearch issue the following command:

service elasticsearch stop

To start Elasticsearch issue the following command:

service elasticsearch start

Then to get Elasticsearch status issue the following command:

service elasticsearch status

You can verify the Elasticsearch version number with this command:

curl -XGET 'localhost:9200'

You can verify Elasticsearch is running with this command:

curl http://localhost:9200/_cluster/health?pretty
 
  • Like
Reactions: RC

Andy

Administrator
Staff member
To upgrade Elasticsearch to a newer version, I recommend first uninstalling the current version, then installing the latest version of Elasticsearch using the instruction from the above post.
  1. Disable Enhanced search in XenForo.
  2. Stop Elasticsearch from command line service elasticsearch stop
  3. Uninstall Elasticsearch from command line sudo yum remove elasticsearch
  4. Enable Enhanced search in XenForo and rebuild the index.
 
  • Like
Reactions: RC

Similar threads

Top