Google Plus

Howto-Install Tomcat in Centos /Fedora the Easy way

Written by Mel Kham on . Posted in CentOS, Fedora

Question: Howto-Install Tomcat in Centos /Fedora the Easy way?

Answer:

The installation is easy, you need to install Java and then Tomocat, to do that open terminal and as root type the following commands:

yum -y install java
yum -y install tomcat6 tomcat6-webapps tomcat6-admin-webapps

- Finally we can launch Tomcat 6:

#/etc/init.d/tomcat6 start

- To connect to Tomcat, just browse to port 8080 (default) on the server, for example:

http://ip:8080/

 

- Where to find the important config fils and directories ?

/etc/tomcat6 (this is where the main tomcat config files reside)
/usr/share/doc/usr/share/tomcat6
/usr/share/tomcat6/bin/usr/share/tomcat6/conf
/usr/share/tomcat6/lib
/usr/share/tomcat6/logs
/usr/share/tomcat6/temp
/usr/share/tomcat6/webapps
/usr/share/tomcat6/work
/var/cache/tomcat6
/var/cache/tomcat6/temp
/var/cache/tomcat6/work
/var/lib/tomcat6 (this is where you will add and/or change most of your files)
/var/lib/tomcat6/webapps
/var/log/tomcat6

- Change Default port !!?

Find server.xml in /etc/tomcat6 and change port from 8080 to other unused port

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

save the new config and restart tomcat

- Make admin password for Tomcat

Edit /etc/tomcat6/tomcat-users.xml  and add the following

<?xml version='1.0' encoding='utf-8'?><tomcat-users> <!-- <role rolename="tomcat"/> <role rolename="role1"/> <user username="tomcat" password="tomcat" roles="tomcat"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="role1" password="tomcat" roles="role1"/> --> <role rolename="manager"/> <role rolename="admin"/> <user username="admin" password="admin" roles="admin,manager"/> </tomcat-users>
Please post any question you have at http://ask.unixmen.com. Thanks
For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.
  • src

     Is there a way to install an headless-java on CentOS ?
    I think java package needs X

  • Guest

    Hi src

    Couldn’t you just download and install Sun’s JDK? No compiling, no X11 required. I prefer it to the packaged options.

    chmod +x ~/jdk-6u27-linux-i586.bin
    cd /usr
    sudo mkdir java
    cd java
    sudo ~/jdk-6u27-linux-i586.bin
    export JAVA_HOME=/usr/java/jdk1.6.0_27
    export PATH=$JAVA_HOME/bin:$PATH

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

SK

|

Yes we can. What kind of help you need? We are doing outsourcing and technical support for Linux and Open source worldwide. To know more about the details visit here.

ClintB

|

After install as above, run shell script /opt/Citrix/ICAClient/wfica.sh manually and note lib errors still occur. I had the x64 motif loaded but had to manually install the x86 too. Got that from http://rpmfind.net/linux/rpm2html/search.php?query=libXm.so.4 Even after that, I still had to do a “yum install alsa-lib.i686 alsa-lib.x86_64″ to resolve any additional libasound.so.2 errors. Once those two lib issues were resolved, Citix Web Interface launched apps fine by telling browser to open launch.ica using /opt/Citrix/ICAClient/wfica.sh. Good luck Ernesto!

AD

|

I need some Help on Linux,can you guide me ?

Edson Carlos

|

In debian no found. I need link download install in linux debian

jacky can

|

You can actually unzip your secret archive by leaving out the -t option, instead using:

unzip newPhoto.jpg

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .