Easiest Way To Install Elastic... apt-get install or wget

Good Day,

In your opinion, what is the easiest way to get Elasticsearch 6.18.5 onto Ubuntu 18.04 servers. I'm looking at this ES guide here... Install Elasticsearch with Debian Package | Elasticsearch Guide [6.8] | Elastic

I see 2 ways to install, apt-get install and wget. My goal is to get ES version 6.8.15 onto our servers with ubuntu 18.04. What route would you go. I know once I get it installed, I need to update the Elasticsearch.yml and java.options files and start the ES service. Which way would you go to install it?

Thanks

Apt will make updates easier, I'd go with that.

Aweome,

So when I do these commands will it install 6.8.15? Cause I see it adds elastic-6.x, so will that install 6.8.15?

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
sudo apt-get update && sudo apt-get install elasticsearch

Again, Thank you SOOO Much.
You have no idea how much this is helping me plan this install.

If that matches Install Elasticsearch with Debian Package | Elasticsearch Guide [6.8] | Elastic, which it looks like, then yes.

Awesome,

question: Using apt-get to install ES, when we later upgrade the OS from 18.04 to say 20.04 in the future. That upgrade won't remove the install of ES. The reason I ask is cause when we first attempt this upgrade from 16.04 to 18.04 the ES install we had in place was completely removed which was puzzling to us.

Thanks

Older versions of Ubuntu used to have Elasticsearch in their default repos, this was removed in newer ones which is possibly what happened there.
If you have the Elastic repo defined, an OS upgrade won't remove that.

That makes a lot of sense. So, with that said when I use the command below...
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
This adds / define the repo so that a OS upgrade wont remove it.

Also,
When I install ES 6.8.15 to a new server running a fresh copy of Ubuntu 18.04, I will install Java via OpenJDK, Do I need to set the JAVA_HOME variable / setting in order to install ES, or just installing the JDK is enough for the install?

Thanks SOOO Much, You have no idea how you are helping me fully prep for this install,

Yep.

If you want to use the bundled JVM you don't need to set it.
If you don't, and want to use your own version (eg an updated one), see Install Elasticsearch with Debian Package | Elasticsearch Guide [8.11] | Elastic

Im more than happy to use the bundled JVM included. Just didn't realize it was bundled. Looking / researching it appears that Ubuntu 18.04 includes Open JDK 11.

That should be fine for ES with no issue, even up to version 7.x correct?

Thanks again!!!

also,

trying to prep and practice for this upcoming install and such, I installed a VM of Ubuntu 18.04 and got that up and running. Then went in after updating and such ran java -version and got back that Java wasn't installed. Am I missing something? I thought that Open JDK was bundled with ubuntu 18.04. Is there something I need to do to get this bundled version of OpenJDK 11 on and set?

Again, Thanks,

Elastic Support Matrix | Elasticsearch is your go to source for JVM compatibility.

Thanks for that link. VERY HELPFUL for what I need.

My real last question is about the bundled JDK with OpenJDK 11 that is suppose to be bundled with Ubuntu 18.04.
I built a VM of Ubuntu 18.04 (desktop for simplicity, but the production will be server) and when I built the VM and now have it all stood up and updated. I ran the java -version command and its saying that java is not install and wants me to sudo install it. I have no problem installing it from apt install, but will that set the default variables i need such as JAVA_HOME so I can use the default OpenJDK 11 settings and such. Just making sure when I install ES and such, I'm not forgetting a set that would make this install fail due to oversight on my part.

Thanks

For your user, yes. But Elasticsearch needs ES_JAVA_HOME set, which you need to do.

Oh,

So I have to set the ES_JAVA_HOME regardless? I thought if I use the bundled OpenJDK in Ubuntu 18.04 I wouldn't have to set the ES_HAVA_HOME variable. But in the VM I setup, I dont see a bundled Java version install, so its asking me to install the OpenJDK 11. I dont mind installing it but once I install it, then I will have to set the ES_JAVA_HOME value for each node? and is there by a default value i should set it to for OpenJDK 11? (It will be a clean server when i install it and will be the only version of java on it)

Thanks

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