linux install tomcat

折腾了好久,按照官网的安装流程安装了不止3次,发现还是不能成功,最终发现是linux机器本身的问题,因为我用的公司的virtual machine,可能是机器本身在一次迁移的过程当中出现了问题,导致了我的悲剧。最终的解决方案是重新setup了virtual machine,并且一路顺畅,安装成功。

 

This artical shows you how to install, configure Tomcat in linux machine. Noted that all of steps are based on root user.

Step 1: Verify Java version, if no java found, please install JDK

java -version

Step 2: download Tomcat

Step 3: unzip the package, and move it to target folder

tar zxf apache-tomcat-8.0.36.tar.gz

cp -R apache-tomcat-8.0.36/* /usr/local/tomcat

Step 4: add CATALINA_HOME

vi ~/.bashrc

#!/bin/bash
CATALINA_HOME=/usr/local/tomcat

source ~/.bashrc

Step 5: Change execute permissions for following files

chmod +x $CATALINA_HOME/bin/startup.sh
chmod +x $CATALINA_HOME/bin/shutdown.sh
chmod +x $CATALINA_HOME/bin/catalina.sh

Step 6: Start Tomcat

$CATALINA_HOME/bin/startup.sh

Step 7: Check web site

http://localhost:8080

Step 8: Start catalina service

sudo $CATALINA_HOME/bin/catalina.sh start 

Step 9: deploy web app or web service into $CATALINA_HOME/webapps folder.

 

Issues:

  • Cannot access web site.
  • Cannot stop catalina service.
  • Could not contact localhost:8005

The problems are sovled by formatting linux server.

 

转载于:https://www.cnblogs.com/allanli/p/how_to_install_tomcat.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值