English
Ask Your Question
0

How To install & Start Apache Tomcat on Fedora 22...and also How to run jsp program

asked 2015-07-24 07:41:13 +0000

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

How To install & Start Apache Tomcat on Fedora 22...and also How to run jsp program

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2016-10-13 18:12:45 +0000

to expand upon luqman's answer...

Install Tomcat by issuing the terminal command ...

sudo dnf install tomcat

Enter your password to allow sudo to give dnf admin permissions.

In case you wanted more information on setting up and using Tomcat once it's installed, here you go... These notes are for Fedora 24, but may work on older versions that have support for dnf. Otherwise try replacing "dnf" with "yum" in these instructions.

To install the webapps, run ...

 sudo dnf install tomcat-webapps

Then issue the command...

service tomcat restart

and enter your password in the challenge screen. Now you should be able to bring up a browser and navigate to http://localhost:8080 and see Tomcat running.

FYI:

  • on Fedora 24, dnf installs Tomcat to /usr/share/tomcat

  • If you want to install the Tomcat management tools run sudo dnf install tomcat-admin-webapps

  • To set the tomcat admin password, edit /usr/share/tomcat/conf/tomcat-users.xml like this... sudo vi /usr/share/tomcat/conf/tomcat-users.xml Un-comment these lines near the bottom...

    <role rolename="admin"/>
    <role rolename="admin-gui"/>
    <role rolename="admin-script"/>
    <role rolename="manager"/>
    <role rolename="manager-gui"/>
    <role rolename="manager-script"/>
    <role rolename="manager-jmx"/>
    <role rolename="manager-status"/>
    <user name="admin" password="<must-be-changed>" roles="admin,manager,admin-gui,admin-script,manager-gui,manager-script,manager-jmx,manager-status" />
    

Change the <must-be-changed> to whatever password you want. You can also change the username to something other than "admin" if you like. Save the file :wq and then run...

    service tomcat restart

To restart tomcat and load the new values. Every time you make a change to Tomcat, you need to re-run "service tomcat restart" to cause it to reload.

Browse to http://localhost:8080 and click on the [Manager App] button. Enter the username "admin" or whater you changed it to, and the password you put in the tomcat-users.xml file and you are logged in to the Tomcat Application Manager.

Have a lot of fun! O_o

edit flag offensive delete link more
0

answered 2015-10-16 09:50:11 +0000

luqman gravatar image

I recently installed the tomcat on fedora 22 using following commands-

yum install tomcat

yum install tomcat-webapps

service tomcat restart

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Stats

Asked: 2015-07-24 07:41:13 +0000

Seen: 5,411 times

Last updated: Oct 16 '15