设为首页 收藏本站
查看: 1081|回复: 0

[经验分享] Apache Tomcat基础知识(二) 下载和安装tomcat

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2015-8-4 12:14:55 | 显示全部楼层 |阅读模式
  此篇为Apache Tomcat基础知识的第一章,下载和安装Tomcat,Tomcat的安装是非常的简单.重点讲述在Linux(CentOS)下的安装,如果您对此章没有兴趣 。那么你可以选择此系统的目录 http://www.iyunv.com/tomaer/articles/1923317.html 选择行的阅读
  
  下载和安装Tomcat
  Tomcat 是跨平台的. 而且有免安装版本.也就是说解压就可以使用,当然前提条件是你安装了 JDK 或者JRE,本篇中将不在讲述如何安装JDK.如果你还不会安装JDK,请查看 http://www.iyunv.com/tomaer/articles/1924335.html
  这里我们选择免安装版本,下载目录:http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.29/bin/ ,这个目录里面列出了很多.在写此章之前。我还不知道原来有Windows 64位版.后面的系列中提到的下载地址为:
       http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.29/bin/apache-tomcat-6.0.29.zip    (Windows platform)
       http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.29/bin/apache-tomcat-6.0.29.tar.gz  (Unix/Linux platform)
  Remark:
  apache-tomcat-[version].zip or .tar.gz
  Base distribution. These distributions do not include the Windows service wrapper nor the compiled APR/native library for Windows.
  apache-tomcat-[version].exe
  32-bit/64-bit Windows installer for Tomcat. Please note that while this distribution includes the vast majority of the base distribution, some of the command-line scripts for launching Tomcat are not included. This distribution is intended for those users planning to launch Tomcat through the Windows shortcuts or services.
  apache-tomcat-[version]-windows-x86.zip
  32-bit Windows specific distribution that includes the Windows service wrapper and the compiled APR/native library for use with 32-bit JVMs on both 32 and 64 bit Windows platforms.
  apache-tomcat-[version]-windows-x64.zip
  64-bit Windows specific distribution that includes the Windows service wrapper and the compiled APR/native library for use with 64-bit JVMs on x64 Windows platforms.
  apache-tomcat-[version]-windows-i64.zip
  64-bit Windows specific distribution that includes the Windows service wrapper and the compiled APR/native library for use with 64-bit JVMs on Itanium 64-bit Windows platforms.
  apache-tomcat-[version]-deployer.zip or .tar.gz
  The standalone Tomcat Web Application Deployer. apache-tomcat-[version]-fulldocs.tar.gz The Tomcat documentation bundle, including complete javadocs.
  
  Unix/Linux platform Install Apache Tomcat 6.0.29
  打开终端,或者打开putty或者别的ssh工具.连接到CentOS.使用命令wget 下载即
  [iyunv@localhost ~]#wget http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.29/bin/apache-tomcat-6.0.29.tar.gz
  当出现 'apache-tomcat-6.0.29.tar.gz' saved [6407210/6407210] 说明下载成功了,可以在终端输入ls查看命令确认一下是否下载完成
接着下来输入以下几条命令
  [iyunv@localhost ~]#mv apache-tomcat-6.0.29.tar.gz /home   ##将下载的tomcat软件包移动到/home目录下面
  [iyunv@localhost ~]#tar -zxvf /home/apache-tomcat-6.0.29.tar.gz -C /usr/local/  ##解压缩tomcat软件到/usr/local目录下面
  [iyunv@localhost ~]#mv /usr/local/apache-tomcat-6.0.29 /usr/local/tomcat  ##修改apache-tomcat-6.0.29的名字为tomcat,注意目录路径
  小提示:上面第3条命令也可以改成做软链的方式.类似Windows下的快捷方式,命令如下:
  [iyunv@localhost ~]#ln -s /usr/local/apache-tomcat-6.0.29 /usr/local/tomcat  ##将apache-tomcat-6.0.29做个快捷方式
  tomcat在Unix/Linux 平台下需要设置一下环境变量,方法如下:
  1.用vi编辑器编辑/etc/profile(Linux主环境配置)文件,在最后加入2行
    TOMCAT_HOME=/usr/local/tomcat
    export PATH TOMCAT_HOME
  2.source /etc/profile 使配置文件及时生效,也可以重新启动系统(reboot)
安装到这里就结束了.
  [iyunv@localhost ~]#/usr/local/tomcat/bin/startup.sh & ##以后台进程的方式启动tomcat
  要停止tomcat,可以使用下面命令
  [iyunv@localhost ~]#/usr/local/tomcat/bin/shutdown.sh
  
  当出现下面的响应时,说明已经成功启动或者终止了tomcat,按下ctrl+c(释放终端) 注:终止tomcat会自动释放终端
  [iyunv@localhost ~]#/usr/local/tomcat/bin/startup.sh &
  
[iyunv@localhost ~]# Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr/java/jdk1.6.0_23
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar
  在浏览器上键入http://ip:8080/ 出现tomcat的页面则说明一切就绪
  
Windows platform Install Apache Tomcat 6.0.29
  此文中给出了windows平台的下载地址,相对于unix/linux平台来讲,windows平台安装tomcat就一步.解压缩即可.假设目录为F:\apache-tomcat-6.0.29,之后我们将这个目录称为tomcat主目录。
  启动tomcat,进入tomcat主目录下面的bin目录,双击startup.bat即可,停止tomcat双击shutdown.bat即可
  在浏览器上键入http://ip:8080/ 出现tomcat的页面则说明一切就绪
  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-94072-1-1.html 上篇帖子: centos下配置apache+php+mysql! 下篇帖子: FreeBSD下安装Apache
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表