How can make the elasticsearch as linux service?n

I installed elasticsearch on linux using tar.gz file. now, I want to run it as a linux service so that if my VM restarts, elasticsearch be started automatically. how can i do it? is there any command to make the elasticsearch running as a linux service?

If you instead installed it using a package that would be automatically done for you. If you install from tar.gz file I think you will need to set it up manually.

1 Like

I know that i can do this using an script, so that when VM start the script run as a linux service , and the script contains the command of running elasticsearch.
but i found some commands for rpm and debian based installation to run elasticsearch as service. but, i cannot found the same for tar file.
thanks, it seems i should do it manually as you said

The service files are only provided for DEB/RPM packages. Why don't you use them?

does rpm installation in linux need root permission?

It requires you to sudo during the installation. If this is a problem I am not sure you would be able to set up a linux service either though.

1 Like

Many thanks.

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