简体   繁体   中英

Run a program as a service on Debian/Linux

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 ?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM