Linux下tomcat的安装与项目部署

最近在linux下安装了jdk,为了圆我以前的心愿,把tomcat也安装了,顺便部署个项目,也算是小又成就感

废话不说了,直接上过程

一.下载安装对应的jdk,并配置Java环境。

有关jdk的安装请看我的上一篇博文http://www.cnblogs.com/cl1255674805/p/5720665.html

二.下载安装tomcathttp://tomcat.apache.org/

[root@cwt123 ~]# unzip apache-tomcat-6.0.30.zip

[root@cwt123 ~]# mv apache-tomcat-6.0.30/ /usr/local/

[root@cwt123 ~]cd /usr/local/

[root@master local]# ln -s /usr/local/apache-tomcat-6.0.30/ /usr/local/tomcat

三.修改tomcat服务器的启动端口

[root@cwt123 apache-tomcat-7.0.70]# cd /usr/local/apache-tomcat-7.0.70/conf
[root@cwt123 conf]# ls
Catalina catalina.properties logging.properties tomcat-users.xml
catalina.policy context.xml server.xml web.xml
[root@cwt123 conf]# vi server.xml

1.按键盘上I,进入编辑状态

2.修改端口为9999

3.按esc,然后输入冒号":",然后W,Q 再按回车键,保存退出

四.启动Tomcat服务器

[root@cwt123 conf]# cd /usr/local/tomcat/bin
[root@cwt123 bin]# ls
bootstrap.jar daemon.sh startup.sh
catalina.bat digest.bat tomcat-juli.jar
catalina.sh digest.sh tomcat-native.tar.gz
catalina-tasks.xml setclasspath.bat tool-wrapper.bat
commons-daemon.jar setclasspath.sh tool-wrapper.sh
commons-daemon-native.tar.gz shutdown.bat version.bat
configtest.bat shutdown.sh version.sh
configtest.sh startup.bat
[root@cwt123 bin]# ./startup.sh
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
[root@cwt123 bin]#

1.访问tomcat

 

 

ok,说明启动成功

 

五.部署项目

1.将打好的war包,放在该路径下

[root@cwt123 apache-tomcat-7.0.70]# cd /usr/local/apache-tomcat-7.0.70/webapps

2.访问该项目的页面

ok,访问成功

 

posted @ 2016-07-30 21:25  小柳爱吃肉  阅读(7958)  评论(0编辑  收藏  举报