Tomcat
Video Title: 01 789 TOMCAT Quick Intro For Interviews
Video url: https://www.youtube.com/watch?v=0i7-t2Pv5Lo
Youtube upload Title: 01 789 TOMCAT Quick Intro For Interviews-by-NCD0618H002
Youtube Uploads: https://www.youtube.com/watch?v=xO26cLB4UR8&t=0s&list=PLEiDY15kH-ieE67rcuNEbBt1Pa_OHOzqL&index=4
Task1: Installation of Tomcat
Solution:
Step1:
# To download the tomcat goto Browser-> http://tomcat.apache.org ->select the suitable file url
# To download the tomcat goto Browser-> http://tomcat.apache.org ->select the suitable file url
Step2:
# download tomcat by using below command
1
|
wget http://www-us.apache.org/dist/tomcat/tomcatat-7.0.88.tar.gz8/bin/apache-tomc
|
Step3:
#Extract and unzip The Tomcat file by using below commands
1
|
unzip tomcat-7.0.88.tar.gz
|
1
|
tar xvf tomcat-7.0.88.tar
|
Step4:
#Download the jdk by using
1
|
wget http://download.oracle.com/otn-pub/java/jdk/10.0.1+10/fb4372174a714e6b8c52526dc134031e/jdk-10.0.1_linux-x64_bin.tar.gz
|
Step5:
#Extract the jdk by using
1
|
gunzip jdk-10.0.1_linux-x64_bin.tar.gz
|
1
|
tar xvf jdk-10.0.1_linux-x64_bin.tar
|
Step6:
#Create a soft link for the Tomcat by using
1
|
ln -s apache-tomcat-9.0.10 tc9
|
Task2: start and stop the Tomcat servers.
Solution:
Step1:
# Start the Tomcat server by using below command
1
|
./catalina.sh start
|
Step2:
#Check whether it is running or not by using
1
|
ps -ef|grep java
|
Step3:
# Stop the Tomcat server by using below command
1
|
./catalina.sh stop
|
Step4:
# Normally server takes default java path then we need to provide the path externally
Step5:
# To provide External java path goto Catalina home->bin here we have to create one shell file using
1
|
vi setenv.sh
|
Step6:
#In that shell file we have to mention as below
1
|
JRE_HOME=/(path of the jdk)
|
1
|
CATALINA_OPTS= "-Xms256m -Xmx512m"
|
Task3: Accessing the Tomcat app server
Solution:
Step1:
#start the server by using
1
|
./catalina.sh start.
|
Step2:
# To check on which port tomcat being running for that we need to see the server.xml
Step3:
# server.xml will describes about tomcat ports which one is for http and for others.
Step4:
# After Knowing port that what is the system looking then go to Browser give ip:port(of your systems)
Step5:
# Now you can able to access the web app manager then you can add the user and then you can able to administrate the Tomcat for this you need to add the user with role in tomcat-users.xml file under conf Directory.
1
|
vi tomcat-users.xml
|
Step6:
# Now you can try with
1
|
ip:port/manager/html
|
Task4: Deploying and undeploying the war file.
Solution:
Step1:
#copy the sample.war file to the tomcat webapps folder.it will extracted automatically.
1
|
cp sample.war /catalina_home/webapps
|
Step2:
# Try to access the web app manager by
1
|
ip:port/sample/
|
file then you can able to access the application.
Step3:
# if you want to undeploy the application then you can just remove the appliction folder from the web-apps folder then you can’t able to access the application on web app manager.
Step4:
#We can deploy or undeploy the war file by using path or location on your system
Step5:
# After deploying the war file it shows under the path column we can go through by clicking on that link.
No comments:
Post a Comment