Join to Get Free Linux Server Hacks & cPanel Tips

Install ElasticSearch on cPanel Servers

Install ElasticSearch on cPanel Servers
4.7 (93.85%) 13 votes

ElasticSearch is a powerful search engine that provides full schema-free JSON text search queries over a web interface. It’s multi-platform as it runs well on Linux and Windows operating systems. In order to work, it requires Java to be installed on your server. It’s also open source under the Apache license. Today we are going to show you how to install ElasticSearch on cPanel.

Tutorial: Install ElasticSearch on cPanel

Install Java 1.8

First, check the java version we have:

[]java -version
java version "1.6.0_39"
OpenJDK Runtime Environment (IcedTea6 1.13.11) (rhel-
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)

If it is less than 1.8, then remove Java so we can install the new version:
dnf remove java

Download Java latest RPM:

cd /usr/src
wget --no-cookies --no-check-certificate --header "Cookie:; oraclelicense=accept-securebackup-cookie" ""
dnf localinstall jdk-8u73-linux-x64.rpm

Verify the new version running:

java -version


[]java -version
java version "1.8.0_73"
Java(TM) SE Runtime Environment (build 1.8.0_73-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)

Remove the dowloaded rpm file:

rm jdk-8u73-linux-x64.rpm -fv

Installing ElasticSearch on cPanel

Download the GPG-KEY:

rpm --import

Let’s create elasticsearch repo inside yum:

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

Paste this content inside:

name=Elasticsearch repository for 2.x packages

Install ElasticSearch:

dnf install elasticsearch

If you need to tweak elasticsearch, you can do it by editing the main configuration file located at:


Add the service to boot after OS starts, and start the service:

chkconfig --add elasticsearch
service elasticsearch start


Elasticsearch is a great search engine for your website, it’s simple and complex at the same time. It’s open source, support linux and windows, and have a great documentation where you can learn from the basics of the service, to advanced techniques and API integration.

As you saw, this can be easily installed on cPanel servers, you just need to verify you are running an updated version of Java, and that’s all.

Further reading: