• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How to: Basic Elasticsearch installation. (RHEL/SUSE)

Xon

Well-known member
@Floren

Is there any reason "/etc/init.d/elasticsearch start" and "service elasticsearch start" would behave differently for which user owns /var/lib/elasticsearch ?

I had a case where "/etc/init.d/elasticsearch start" start when run as root, but "service elasticsearch start" would fail because /var/lib/elasticsearch was owned by root for some reason.

Changing ownership of /var/lib/elasticsearch fixed it, and allowed elasticsearch to start correctly on boot and when using 'service' to start/stop it.
 

eva2000

Well-known member

@Floren has an amazing repo for RHEL 6 and 7, the Elasticsearch RPM he provides is perfectly set up and currently I suggest using it.

The old manual setup guide can be found below.

Step 1) Install the Axivo Repo: https://www.axivo.com/resources/repository-setup.1/

Step 2) Install ElasticSearch: https://www.axivo.com/resources/elasticsearch-setup.11/
FYI, Axivo Repo only has RHEL6/CentOS 6 Elasticsearch YUM package. There's no RHEL7 / CentOS 7 package yet.

here's to @Floren releasing the RHEL7/CentOS7 version. For now on CentOS7, I use the official Elasticsearch EL7 YUM package.

from official repo http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-repositories.html

Code:
 yum list available --disablerepo=* --enablerepo=elasticsearch-1.4 -q
Available Packages
elasticsearch.noarch                                                        1.4.4-1                                                         elasticsearch-1.4
From Axivo EL7 / CentOS 7 available packages
Code:
yum list available --disablerepo=* --enablerepo=axivo --disableplugin=priorities -q
Available Packages
GeoIP.x86_64                                                                         1.6.2-1.el7                                                        axivo
GeoIP-devel.x86_64                                                                   1.6.2-1.el7                                                        axivo
GeoIP-update.noarch                                                                  1.6.2-1.el7                                                        axivo
glusterfs.x86_64                                                                     3.5.2-1.el7                                                        axivo
glusterfs-api.x86_64                                                                 3.5.2-1.el7                                                        axivo
glusterfs-api-devel.x86_64                                                           3.5.2-1.el7                                                        axivo
glusterfs-cli.x86_64                                                                 3.5.2-1.el7                                                        axivo
glusterfs-devel.x86_64                                                               3.5.2-1.el7                                                        axivo
glusterfs-extra-xlators.x86_64                                                       3.5.2-1.el7                                                        axivo
glusterfs-fuse.x86_64                                                                3.5.2-1.el7                                                        axivo
glusterfs-geo-replication.x86_64                                                     3.5.2-1.el7                                                        axivo
glusterfs-libs.x86_64                                                                3.5.2-1.el7                                                        axivo
glusterfs-rdma.x86_64                                                                3.5.2-1.el7                                                        axivo
glusterfs-regression-tests.x86_64                                                    3.5.2-1.el7                                                        axivo
glusterfs-resource-agents.noarch                                                     3.5.2-1.el7                                                        axivo
glusterfs-server.x86_64                                                              3.5.2-1.el7                                                        axivo
jemalloc.x86_64                                                                      3.6.0-1.el7                                                        axivo
jemalloc-devel.x86_64                                                                3.6.0-1.el7                                                        axivo
openssl.x86_64                                                                       1:1.0.1j-1.el7                                                     axivo
openssl-devel.x86_64                                                                 1:1.0.1j-1.el7                                                     axivo
openssl-libs.x86_64                                                                  1:1.0.1j-1.el7                                                     axivo
openssl-perl.x86_64                                                                  1:1.0.1j-1.el7                                                     axivo
openssl-static.x86_64                                                                1:1.0.1j-1.el7                                                     axivo
pcre.x86_64                                                                          8.35-1.el7                                                         axivo
pcre-devel.x86_64                                                                    8.35-1.el7                                                         axivo
pcre-static.x86_64                                                                   8.35-1.el7                                                         axivo
pcre-tools.x86_64                                                                    8.35-1.el7                                                         axivo
 
Last edited:

Floren

Well-known member
@eva2000, I'm waiting for the RHEL 7.1 release, before I migrate all packages... still few things to fiddle with, like adjusting everything to systemd/firewalld. I always waited for a the .1 release before moving to a new version in production.
 

Slavik

XenForo moderator
Staff member
@Slavik the version in @Floren's repos ships with a remote exploit if it isn't configured 100% correctly (that hit AVForums recently).
Code:
yum list --disablerepo=* --enablerepo=axivo -q | grep elastic
elasticsearch.x86_64  1.4.2-1.el6  @axivo
If you follow the guide as per linked in the original post then its fine.

Code:
 sed -i 's|^#network.host.*|network.host: 127.0.0.1|' /etc/elasticsearch/elasticsearch.yml
Code:
sed -i 's|^#script.disable_dynamic.*|script.disable_dynamic: true|' /etc/elasticsearch/elasticsearch.yml
 
I have successfully installed.
after a few hours, I have to run ssh service start an elastic search.
otherwise it will not work
I want to ask is there a way to config elasticsearch not going concern ?

Thanks you.
 

Joe Link

Well-known member
AXIVO repo provides a standard RPM. It is your responsibility to read the tutorial and secure your server, the same way you do when you install CentOS/RHEL.
@Floren, thanks for your work. Due to lack of knowledge, I'm always a little worried hearing something like this. Are the additional steps mentioned on your pages (and quoted above by Slavik) the steps needed to secure this, and you mean it's our responsibility to follow the steps? or are there additional steps it is assumed someone running Linux should know?
 

Slavik

XenForo moderator
Staff member
@Floren, thanks for your work. Due to lack of knowledge, I'm always a little worried hearing something like this. Are the additional steps mentioned on your pages (and quoted above by Slavik) the steps needed to secure this, and you mean it's our responsibility to follow the steps? or are there additional steps it is assumed someone running Linux should know?
Floren is saying that you should take responsibility for checking packages and securing your server *whatever* you install. If the guide you use includes those steps (Florens does), then so be it, but simply relying on guides without understanding *why* you are doing a particular step could lead you into trouble in the future. This is why in my guides I generally explain what im doing to give the reader a better understanding.