InMotion Hosting Support Center

Elasticsearch is an incredibly powerful search engine in which data can be stored and recalled in real-time. Because of the speed and reliability of Elasticsearch, it is highly recommended if you are searching through large amounts of data on a regular basis. Thanks to projects like ElasticPress, it can also be used easily within WordPress as a replacement for the default search. In this article, we will show you how to install Elasticsearch on InMotion Hosting or any other CentOS/Red Hat based system.

Note: You will need to have a VPS or dedicated server with root access to be able to install Elasticsearch.

Installing Elasticsearch from the repository

The easiest way to install Elasticsearch is from their repositories. Doing so is not only simple to install, but will also allow you to easily keep Elasticsearch updated.

  1. First, SSH into your server as root.

  2. Now, as Elasticsearch depends on Java to run, we will need to begin installing Java on the server. To do so, first begin by updating the repositories:

    yum update

    Now, install Java:

    yum install java

    If all goes well, Java should now be installed on the server and you are ready to begin installing Elasticsearch.

  3. Next, we will add the Elasticsearch repository to the server. Begin by adding the public signing key:

    rpm --import

  4. Now, we need to add the actual repository. Use the following to open a text editor and create a new file holding the Elasticsearch repository:

    nano /etc/yum.repos.d/elasticsearch.repo

    Within the text editor, paste in the following:

    name=Elasticsearch repository for 6.x packages

    Once entered, press Ctrl+X and then the Y key to save changes.

  5. Now that the repository is set up, Elasticsearch is ready to install. To do so, enter the following:

    yum install elasticsearch

    Elasticsearch will now be installed. Once complete, if you want it to automatically start when the system is booted, follow the next section on setting ElasticSearch as a system service.

Setting ElasticSearch as a system service

If you want Elasticsearch to automatically when the system is started, enter the following command to see it as a system service:

chkconfig --add elasticsearch


If you're using Systemd, enter the following command instead:

systemctl enable elasticsearch

Elasticsearch with WordPress

In addition to Elasticsearch's many use cases, individuals can easily integrate Elasticsearch with WordPress. For more information on doing so, take a look at our article on Elasticsearch in WordPress using ElasticPress.

Was this article helpful?

Related Questions

Here are a few questions related to this article that our customers have asked:
Elasticsearch not running by itself
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Support Center Login

Our Login page has moved. Please click the button below to be redirected to the login page.

n/a Points
2018-03-29 10:50 am

Can this installation happen on your shared hosting packages ?! Or is it a must to have a VPS to make this work ?

10,929 Points
2018-03-29 11:33 am
This must be performed on a VPS at least, because it requires root access. However, if you have WordPress, there are plugins like Jetpack which uses Elasticsearch in their premium version to make searching your site faster.
n/a Points
2016-11-23 11:27 pm

Thx for your guide, it was almost perfect in my case. What I changed was, in step 4:



name=Elasticsearch repository for 1.7.x packages






And then 

sudo nano /etc/elasticsearch/elasticsearch.yml

using these options:

http.port: 9200

And finally,

sudo service elasticsearch start


n/a Points
2016-04-14 5:49 am

Fix the tutorial Please !@!@ 

31,499 Points
2016-04-14 12:10 pm
Hello Amit,

Thank you for contacting. We recently tested this article successfully, and everything seems to be working.

What issues are you having with the guide?

Are getting any errors? What are they?

Thank you,
n/a Points
2016-01-06 11:40 pm

This page needs updated, the URL for the repository is now Also, newer versions exist beyond 1.4.


10,929 Points
2016-01-07 9:58 am
Thank you for letting us know. We'll certainly review the article and update where necessary.
n/a Points
2015-03-10 2:57 am


After struggling a bit, I managed to get it running. For some reasons, my webservices which are calling the elastic client, are only working inside a specific folder.

Thanks anyway!

n/a Points
2015-03-09 11:51 pm


One of the reason I chose inmotion for my website is because it provides a tutorial for installing elasticsearch, which is present in my website. I have already followed all the steps successfully. But the service is not working on the website. I am getting the following error response on php services that creates an elastic search client :

Fatal error: Class 'Elasticsearch\Client' not found in /home/catove5/public_html/catovert/gateway/app/init.php on line 5

Can you please indicate what should be done next to get it running on the website?

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

9 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!