首页 > 代码库 > Linux Tomcat
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-upchkconfig tomcat6 on
Start tomcatservice tomcat6 start
Add port on iptablesiptables -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
Linux Tomcat