1.打开cmd 2.把tomcat目录bin下的service.bat文件拖至cmd 3.在cmd运行刚才拖入的指令 4.按照指令 install + 服务名称即可 5.在系统服务中,找到刚才新建的服务,设置随机启动