# Installing Elasticsearch on CentOS using RPM

**URL:** https://discuss.elastic.co/t/installing-elasticsearch-on-centos-using-rpm/109143
**Category:** Elasticsearch
**Created:** [November 26, 2017, 5:14pm UTC](https://discuss.elastic.co/t/installing-elasticsearch-on-centos-using-rpm/109143 "2017-11-26T17:14:50Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![AndyB](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@AndyB](https://discuss.elastic.co/u/AndyB)
#### Post date: [November 26, 2017, 5:14pm UTC](https://discuss.elastic.co/t/installing-elasticsearch-on-centos-using-rpm/109143/1 "2017-11-26T17:14:50Z")

</div>

Hello,

I'm currently running ElasticSearch Version: 5.0.1 on my CentOS dedicated server. It also has cPanel, but I assume the easiest way for me to upgrade to ElasticSearch 6.0.0 is to use the RPM instruction located here:

[https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html)

 ![pic001](https://us1.discourse-cdn.com/elastic/original/3X/f/0/f0f8f56033c66e87b9f387bd58b93cecab60024f.jpg)

My question is, does it matter which directory I'm in after I SSH into my server? Do I just run the following three commands from the root directory?

Thank you

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 26, 2017, 6:00pm UTC](https://discuss.elastic.co/t/installing-elasticsearch-on-centos-using-rpm/109143/2 "2017-11-26T18:00:43Z")

</div>

> [@AndyB](#):
>
> Do I just run the following three commands from the root directory?

That will work, yes.

---

<div class="post-metadata">

### Author: ![AndyB](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@AndyB](https://discuss.elastic.co/u/AndyB)
#### Post date: [November 26, 2017, 6:17pm UTC](https://discuss.elastic.co/t/installing-elasticsearch-on-centos-using-rpm/109143/3 "2017-11-26T18:17:48Z")

</div>

Thank you, warkolm.

The first two commands worked fine, but the last one appears to have some problems. This is a screen print of my terminal showing the messages:

 ![pic001](https://us1.discourse-cdn.com/elastic/original/3X/c/8/c8c448019e224995c5564e227fb11d191d01a435.jpg)

What should I do?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 26, 2017, 6:27pm UTC](https://discuss.elastic.co/t/installing-elasticsearch-on-centos-using-rpm/109143/4 "2017-11-26T18:27:31Z")

</div>

Please don't post pictures of text, they are difficult to read and some people may not be even able to see them 🙂

---

<div class="post-metadata">

### Author: ![AndyB](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@AndyB](https://discuss.elastic.co/u/AndyB)
#### Post date: [November 26, 2017, 6:43pm UTC](https://discuss.elastic.co/t/installing-elasticsearch-on-centos-using-rpm/109143/6 "2017-11-26T18:43:04Z")

</div>

I assume that I need to uninstall ElasticSearch Version: 5.0.1.

Is this the correct command?

yum remove elasticsearch

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 26, 2017, 6:48pm UTC](https://discuss.elastic.co/t/installing-elasticsearch-on-centos-using-rpm/109143/7 "2017-11-26T18:48:19Z")

</div>

Yes, that should remove the existing Elasticsearch. But you should also be able to install 6.0 over the top of 5.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 26, 2017, 7:01pm UTC](https://discuss.elastic.co/t/installing-elasticsearch-on-centos-using-rpm/109143/9 "2017-11-26T19:01:40Z")

</div>

It'd be worth reading [https://www.elastic.co/guide/en/elasticsearch/reference/6.0/setup-upgrade.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/setup-upgrade.html)

---

<div class="post-metadata">

### Author: ![AndyB](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@AndyB](https://discuss.elastic.co/u/AndyB)
#### Post date: [November 26, 2017, 8:23pm UTC](https://discuss.elastic.co/t/installing-elasticsearch-on-centos-using-rpm/109143/13 "2017-11-26T20:23:28Z")

</div>

I was able to install ElasticSearch 6.0 by first uninstalling 5.0 using the following command:

yum remove elasticsearch

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [December 24, 2017, 8:23pm UTC](https://discuss.elastic.co/t/installing-elasticsearch-on-centos-using-rpm/109143/14 "2017-12-24T20:23:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
