安裝配置jdk
安裝配置tomcat
具體步驟參考博客:http://www.itdecent.cn/p/b71296e8b9a7
如何設(shè)置tomcat自動啟動:

image.png

image.png
遇到的問題:
1、chkconfig命令沒有安裝,cannot find
那么首先需要安裝chkconfig命令
apt-get install chkconfig
2、安裝后執(zhí)行
chkconfig --list | grep tomcat
chkconfig -a tomcat
無法出現(xiàn)報錯:/sbin/insserv: No such file or directory
則執(zhí)行:# ln -s /usr/lib/insserv/insserv /sbin/insserv
如果沒有報錯,則再次執(zhí)行:chkconfig -a tomcat
然后繼續(xù)執(zhí)行:chkconfig --list | grep tomcat
如果顯示:0:off 1:off 2:on 3:on 4:on 5:on 6:off 則配置成功
執(zhí)行:ps -ef |grep tomcat 查看tomcat是否成功啟動
如圖則表示啟動成功。kill -g 4244表示殺掉進程。

image.png