簡體   English   中英

在Ubuntu中設置tomcat

[英]setting up tomcat in Ubuntu

我已經通過很多教程在我的Ubuntu系統中安裝tomcat。 我安裝了tomcat7。 tomcat7-admin,tomcat7-examples和tomcat7-docs通過以下命令:

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

完成此設置后,我可以啟動,停止服務器:

/etc/init.d/tomcat7 start/stop

我有以下文件和文件夾:

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

我在/usr/sharetomcat7/conf/tomcat-users.xml/etc/tomcat7/tomcat-users.xml下的tomcat-users.xml文件中添加了以下用戶

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

現在,當我打開localhost:8080時,我得到一個沉悶的頁面,說“它有效”,而不像我們普遍得到的彩色頁面。 這些是頁面的內容:

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.

但是當我點擊上面的“點擊此處”鏈接打開管理員,文檔或示例時,我得到"HTTP status 404: The requested resource is not available."

但我已經安裝了管理員,示例和文檔。 我沒有得到它。 請幫忙! 我正在使用Ubuntu 13.04

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

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

在webapps文件夾中為每個應用程序創建一個鏈接,如下所示:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM