Linux Tomcat

本文提供了一步一步的指南,教你如何在CentOS/RHEL和Fedora系统上安装JDK 1.7版本,并通过配置Tomcat来运行Web应用。包括下载、验证、安装JDK,以及安装和配置Tomcat的过程,最终展示如何通过浏览器访问Tomcat部署的应用。

jdk安装

http://www.tecmint.com/install-jdk-jre-on-rhe-centos-6-5-and-fedora-17-12/

downlad jdk1.7
from website http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
check jdk
rpm –qa | grep java
rpm –qa |grep jdk
rpm –e java*
rpm –e jdk*
force del package (rpm –e –-nodeps java*)
install
rpm -Uvh jdk-7u25-linux-x64.rpm
check
java –version
 

Tomcat安装

wget http://www.dsgnwrld.com/am/tomcat/tomcat-6/v6.0.41/bin/apache-tomcat-6.0.41-deployer.tar.gz

 

reference

http://www.vr4servers.com/tomcat6/

install tomcat

yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps

You can modify default port 8080 to 80 (if required)
vi /usr/share/tomcat6/conf/server.xml
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />

For tomcat admin modify file
vi /usr/share/tomcat6/conf/tomcat-users.xml
add line
<user username="admin" password="tomcatpass" roles="manager"/>
in between <tomcat-users> & </tomcat-users>

Add permanent at start-up
chkconfig tomcat6 on


Start tomcat
service tomcat6 start

Add port on iptables
iptables -I INPUT -p tcp --dport 8o -j ACCEPT
service iptables save
service iptables restart

Open browser and add url or ip of your server in address bar

eg http://localhost:8080/
click on Tomcat Manager give username and password as you have added on the file tomact-users.xml as admin and tomcatpass

转载于:https://www.cnblogs.com/huiwq1990/p/3930289.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值