Linux Tomcat

jdk安装

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

downlad jdk1.7
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
install
rpm -Uvh jdk-7u25-linux-x64.rpm
check
java –version
 

Tomcat安装

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

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。