1、安装sysv-rc-conf
bash
cd /etc/apt/sources.list.d
新建资源文件
sudo vi situation.list
追加资源库:
deb http://ports.ubuntu.com/ubuntu-ports/ trusty main universe restricted multiverse
安装sysv-rc-conf
sudo apt-get update
sudo apt-get install sysv-rc-conf
2、设置自启动服务
bash
sudo sysv-rc-conf tomcat on
tomcat服务的简要说明
bash
vi /etc/init.d/tomcat
------------------
tomcat脚本略。。。,可以参照
https://blog.csdn.net/yhj_911/article/details/106976420?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522C1A675B2-34EA-4DEE-B40E-126628A6F1B9%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=C1A675B2-34EA-4DEE-B40E-126628A6F1B9&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-4-106976420-null-null.nonecase&utm_term=tomcat&spm=1018.2226.3001.4450
------------------
给与该文件权限
chmod u+x /etc/init.d/tomcat