How can make the elasticsearch as linux service?n


(sahere rahimi) #1

hi,
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?


(Christian Dahlqvist) #2

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.


(sahere rahimi) #3

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


(Mark Walkom) #4

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


(sahere rahimi) #5

does rpm installation in linux need root permission?


(Christian Dahlqvist) #6

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.


(sahere rahimi) #7

Many thanks.