Download tomcat from http://tomcat.apache.org/
Before we begin, we will need to have a Java installed
[nikhil@bom ~]$ which java
/usr/java/jdk1.5.0_11/bin/java
[nikhil@bom ~]$ cat .bashrc
# .bashrc
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
PATH=/usr/java/jdk1.5.0_11/bin/:$PATH;export PATH
export JAVA_HOME=/usr/java/jdk1.5.0_11
[nikhil@bom ~]$ mkdir /tomcat
[nikhil@bom ~]$ mkdir /Dowmloads
[nikhil@bom ~]$ mv /Downlods/jakarta-tomcat-Xxxx.tar.gx /opt/tomcat
[nikhil@bom ~]$ tar -xvzf jakarta-tomcat-Xxxxtar.rg
[nikhil@bom ~]$ rm -rf jakarta-tomcat-Xxxxtar.rg
[nikhil@bom ~]$ mv jakarta-tomcat/* .
[nikhil@bom ~]$ rm -rf jakarta-tomcat
Now login to root user and create a user called "tomcat"
[nikhil@bom ~]$ sudo su -
Password:
[nikhil@bom ~]$ sudo su -
Password:
[root@bom ~]# groupadd tomcat
[root@bom ~]# useradd -g tomcat -d /opt/tomcat tomcat
[root@bom ~]# passwd tomcat
[root@bom ~]# chown -R tomcat:tomcat /opt/tomcat
Switch to tomcat user
[root@bom ~]# su - tomcat
Now try to start tomcat with tomcat user
Make sure Java path is correct
[tomcat@bom ~]$ cat .bashrc
# .bashrc
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
PATH=/usr/java/jdk1.5.0_11/bin/:$PATH;export PATH
export JAVA_HOME=/usr/java/jdk1.5.0_1
xport CATALINA_HOME=/opt/tomcat
[tomcat@bom ~]#sh /opt/tomcat/bin/startup.sh
[tomcat@bom ~]#sh /opt/tomcat/bin/shutdown.sh
###################################################################################
Administering Tomcat
* Server Status application
* Tomcat Administration Tool
* Tomcat Manager
Tomcat Administrator Role admin This is a built-in role.
Tomcat Manager Role manager This is a built-in role.
Tomcat Administrator Username TomcatAdmin
Tomcat Administrator Password passwd
Open with vi $CATALINA_HOME/conf/tomcat-users.xml
tomcat-users>
role rolename="tomcat"/>
role rolename="role1"/>
role rolename="manager"/>
role rolename="admin"/>
user username="tomcat" password="tomcat" roles="tomcat"/>
user username="both" password="tomcat" roles="tomcat,role1"/>
user username="role1" password="tomcat" roles="role1"/>
user username="TomcatAdmin" password="passwd" roles="admin,manager"/>
tomcat-users>
Save the file, start Tomcat and open a browserYou should be able to access the Administartion Tool web application by clicking on the "Tomcat Administration" link on the left sidebar, make sure u have extracted admin tool also to ur $CATALINA_HOME
Monday, June 28, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment