Run a program as a service on Debian/Linux

783 views Asked by At

I have an older jetty server I want to turn into as a service on a Debian OS. It should start automatic each time I restart the computer.

Manually I start the server with the two following commands:

  1. root@myserver:/# cd /opt/jdk/jetty
  2. root@myserver:/opt/jdk/jetty# java jetty

Anyone know how to do this ?

1

There are 1 answers

1
shivams On

If you want to start any program on booting you can add that entry in rc.local.

java /opt/jdk/jetty/jetty

It will start on reboot