ln -s /usr/apache-tomcat-7.0.64/bin/startup.sh /etc/rc.d/init.d/tomcat7
通过上面的命令将startup.sh文件连接到init.d目录下名称为tomcat7
4.然后切换到/etc/rc.d/init.d/目录
用ll查看一下tomcat是否有可执行权限
如果没有的话使用chmod +x tomcat7添加执行权限
然后用chkconfig --add tomcat7 添加开机启动服务
最后使用chkconfig --list确认一下是否添加成功