How to Install Tomcat Linux web servers on Ubuntu
The Apache Tomcat software is an open source implementation of the Java Servlet, JavaServer Pages, Java Expression Language and Java Web Socket technologies. The Java Servlet, Java Server Pages, Java Expression Language and Java WebSocket specifications are developed under the Java Community Process.
Step: 1
To Install java check this Post for steps.
Step: 2
Download Tomcat 7 tar.gz binary distribution from Tomcat webite Click Here.
Step: 3
Extract tar file using below command.
#tar -xvzf apache-tomcat-7.0.35.tar.gz
Step :4
Move it to/usr/local/tomcat7 location using following command.
#sudo mv apache-tomcat-7.0.35 /usr/local/tomcat7
Step :5
Open /usr/local/tomcat7/bin/catalina.sh file using following command to add java home path (Verify with your java location and virsion)
vim /usr/local/tomcat7/bin/catalina.sh
Add following two lines in there after the first line.
JAVA_HOME="/usr/java/jdk1.7.0_11"
JRE_HOME="/usr/java/jdk1.7.0_11/jre"
Step :6
Open /usr/local/tomcat7/conf/tomcat-users.xml and Then add a manager-gui & admin-gui role along with user details as below.
#vi /usr/local/tomcat7/conf/tomcat-users.xml
remove the </tomcat-users> tag and insert below line
<!-- user admin can access manager and admin section both -->
<role rolename="admin-gui" />
<user username="admin" password="redhat" roles="manager-gui,admin-gui" />
</tomcat-users>
:wq!
Step :7
Start the Tomcat server using following command.
#sudo/usr/share/tomcat7/bin/catalina.sh run
Step :8
Verify Tomcat installation using the following URL
http://localhost:8080
To login as the manager, use the following URL, provide the relevant username and password
http://localhost:8080/manager/html
Note : You can deploy your application in /usr/share/tomcat7/webapps
Step: 1
To Install java check this Post for steps.
Step: 2
Download Tomcat 7 tar.gz binary distribution from Tomcat webite Click Here.
Step: 3
Extract tar file using below command.
#tar -xvzf apache-tomcat-7.0.35.tar.gz
Step :4
Move it to/usr/local/tomcat7 location using following command.
#sudo mv apache-tomcat-7.0.35 /usr/local/tomcat7
Step :5
Open /usr/local/tomcat7/bin/catalina.sh file using following command to add java home path (Verify with your java location and virsion)
vim /usr/local/tomcat7/bin/catalina.sh
Add following two lines in there after the first line.
JAVA_HOME="/usr/java/jdk1.7.0_11"
JRE_HOME="/usr/java/jdk1.7.0_11/jre"
Step :6
Open /usr/local/tomcat7/conf/tomcat-users.xml and Then add a manager-gui & admin-gui role along with user details as below.
#vi /usr/local/tomcat7/conf/tomcat-users.xml
remove the </tomcat-users> tag and insert below line
<!-- user admin can access manager and admin section both -->
<role rolename="admin-gui" />
<user username="admin" password="redhat" roles="manager-gui,admin-gui" />
</tomcat-users>
:wq!
Step :7
Start the Tomcat server using following command.
#sudo/usr/share/tomcat7/bin/catalina.sh run
Step :8
Verify Tomcat installation using the following URL
http://localhost:8080
To login as the manager, use the following URL, provide the relevant username and password
http://localhost:8080/manager/html
Note : You can deploy your application in /usr/share/tomcat7/webapps
How to Install Tomcat Linux web servers on Ubuntu
Reviewed by TecGeeks News
on
April 08, 2016
Rating:
No comments: