ubuntu下配置添加tomcat7
现在是当记录下对此系统的操作,其实大家做多了就发现,都差不多的步骤。
1.下载包,官网
2.移动到自己想要的目录下
3.修改添加/usr/develop/tomcat-7.0.39/bin/catalina.bat ,如有必要,也可以到conf目录下修改servlet。xml里的服务器端口,这些和windows下一样内容如下:
- JAVA_HOME=/home/administrator/Java/jdk1.7
4.启动运行bin下的startup.sh,结果如下:
/usr/develop/tomcat-7.0.39/bin$ sudo ./startup.sh
Using CATALINA_BASE: /usr/develop/tomcat-7.0.39
Using CATALINA_HOME: /usr/develop/tomcat-7.0.39
Using CATALINA_TMPDIR: /usr/develop/tomcat-7.0.39/temp
Using JRE_HOME: /usr/develop/jdk1.7
Using CLASSPATH: /usr/develop/tomcat-7.0.39/bin/bootstrap.jar:/usr/develop/tomcat-7.0.39/bin/tomcat-juli.jar
小提示:如遇到startup.sh:找不到命令。解决方法:chmod +x startup.sh
5关闭tomcat:
/usr/develop/tomcat-7.0.39/bin$ sudo ./shutdown.sh
Using CATALINA_BASE: /usr/develop/tomcat-7.0.39
Using CATALINA_HOME: /usr/develop/tomcat-7.0.39
Using CATALINA_TMPDIR: /usr/develop/tomcat-7.0.39/temp
Using JRE_HOME: /usr/develop/jdk1.7
Using CLASSPATH: /usr/develop/tomcat-7.0.39/bin/bootstrap.jar:/usr/develop/tomcat-7.0.39/bin/tomcat-juli.jar