Step 1:
yum install tomcat tomcat-webapps.noarch tomcat-admin-webapps.noarch
Step 2:
vim /usr/share/tomcat/conf/tomcat-users.xml
Step 3:
Edit
role rolename="admin"/>
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<role rolename="manager"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user name="admin" password="SecretPassword" roles="admin,manager,admin-gui,admin-script,manager-gui,manager-script,manager-jmx,manager-status" />
</tomcat-users>
Step 4:
# systemctl start tomcat
# systemctl enable tomcat
Step 5: Testing the settings at browser
localhost:8080
Step 6:Deply code
#cp code in /usr/share/tomcat/webapps/
Step 7: Change user
#chown tomcat:tomcat /usr/share/tomcat/webapps/sample.war
Step 8: Deployment by Tomcat Manager Application
We need to browse the war file that we'll deploy:
Chose war file and deploy
Step 10: # tail -f /var/log/tomcat/catalina.2018-10-13.log
Step 11 : #
No comments:
Post a Comment