Install Tomcat 7 on Ubuntu
Step: 1Install java check this post
Step: 2Download Tomcat 7 tar.gz binary distribution from Here.
Step: 3
Unpack it using following command.
tar
-xvzf apache-tomcat-7.0.35.
tar
.gz
Step :4
Move it to a more appropriate location using following command.
sudo
mv
apache-tomcat-7.0.35/ /usr/local/tomcat7
Step :5
Open up /usr/local/tomcat7/bin/catalina.sh file using following command
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 :6Open /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!
:wq!
Step :7
Start the Tomcat server using following command.
sudo
/usr/share/tomcat7/bin/catalina.sh run
Verify Tomcat installation using the following URL
http://127.0.0.1:8080
Or
http://localhost:8080
To login as the manager, use the following URL, provide the relevant username and password
http://localhost:8080/manager/html
No comments:
Post a Comment