Sunday, March 10, 2013

Install and configure JDK and Tomcat in Scientific Linux 6 for the first time


download jdk rpm and install by rpm -ivh command

download tomcat package

tar -zxvf apache-tomcat-7.0.37.tar.gz -C /opt

sh -c 'echo export sourav_home=/opt/apache-tomcat-7.0.37 > /etc/profile.d/tomcat.sh'

source /etc/profile.d/tomcat.sh

to start tomcat

$sourav_home/bin/startup.sh

now open browser and go to

http://192.168.163.201:8080

and you will see the tomcat web interface

to shutdown tomcat

$sourav_home/bin/shutdown.sh

Now go to /opt/apache-tomcat-7.0.37/webapps/ and create a folder named sourav

create a.jsp there with some sample jsp code like this

<br>

go to browser and put this url

http://192.168.163.201:8080/ch01/a.jsp

and you are done!




No comments:

Post a Comment