简体   繁体   中英

setting up tomcat in Ubuntu

I have gone through many tutorials for installing tomcat in my Ubuntu system. I installed tomcat7. tomcat7-admin, tomcat7-examples and tomcat7-docs by following commands:

apt-get install tomcat7
apt-get install tomcat7-admin
apt-get install tomcat7-docs
apt-get install tomcat7-examples

After this setup I can start, stop the server by:

/etc/init.d/tomcat7 start/stop

I have following files and folders:

/usr/share/tomcat7/
/etc/tomcat7/
/var/lib/tomcat7/

I have added the following user in tomcat-users.xml file under /usr/sharetomcat7/conf/tomcat-users.xml and /etc/tomcat7/tomcat-users.xml

<user username="admin" password="amdin" roles="admin-gui,standard,manager-gui"/>

Now when I open localhost:8080, I get a dull page saying 'It works' unlike the colorful page we get generally. These are the contents of page:

You might consider installing the following packages, if you haven't already done so:

tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking here.

tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking here.

tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the manager webapp and the host-manager webapp.

But when I click on 'click here' link above to open admin, docs or examples I get "HTTP status 404: The requested resource is not available."

But I have installed admin, examples and docs. I am not getting it. Please help! I am using Ubuntu 13.04

在ubuntu 14.04上,它使用以下命令为我工作:

sudo apt-get install tomcat7-docs tomcat7-admin tomcat7-examples

Create a link for each application in webapps folder as below:

cd /var/lib/tomcat7/webapps
sudo ln -s /usr/share/tomcat7-examples/examples examples
sudo ln -s /usr/share/tomcat7-docs/docs docs
sudo ln -s /usr/share/tomcat7-admin/manager manager
sudo ln -s /usr/share/tomcat7-admin/host-manager host-manager

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM