Tuesday 26 April 2016

install tomcat on linux


install tomcat

go to /temp dir
sudo wget http://redrockdigimark.com/apachemirror/tomcat/tomcat-7/v7.0.69/bin/apache-tomcat-7.0.69.tar.gz

2) unzip file
tar xzf apache-tomcat-7.0.69.tar.gz

3) move the folder to tomcat7

mv apache-tomcat-7.0.69 /usr/local/tomcat7

4) start the tomcat server.
go to the ./bin/startup.sh

output :
cmd : ./bin/startup.sh
Using CATALINA_BASE:   /usr/local/tomcat7/apache-tomcat-7.0.69
Using CATALINA_HOME:   /usr/local/tomcat7/apache-tomcat-7.0.69
Using CATALINA_TMPDIR: /usr/local/tomcat7/apache-tomcat-7.0.69/temp
Using JRE_HOME:        /usr/java/jdk1.8.0_45/jre
Using CLASSPATH:       /usr/local/tomcat7/apache-tomcat-7.0.69/bin/bootstrap.jar:/usr/local/tomcat7/apache-tomcat-7.0.69/bin/tomcat-juli.jar
Tomcat started.

5) set up user account in conf/tomcat-users.xml.

<!-- user manager can access only manager section -->
<role rolename="manager-gui" />
<user username="manager" password="abc" roles="manager-gui" />

<!-- user admin can access manager and admin section both -->
<role rolename="admin-gui" />
<user username="admin" password="def" roles="manager-gui,admin-gui" />


6) change the port to 8082

go to conf/server.xml  and change the default port from 8080 t0 8082

 <Connector port="8082" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

7) connect to tomcat :
http://xx.xxx.xxx.xxx:8082/manager/html

No comments:

Post a Comment