如何在Fedora 20中安装Apache Tomcat

时间:2014-07-23 08:10:02

标签: java apache tomcat fedora

我想在fedora 20中安装Apache Tomcat。 我尝试使用下面的代码

安装tomcat
yum install tomcat.

然后,在系统启动时启用Tomcat:

systemctl enable tomcat

命令执行正常,但尝试http://127.0.0.1:8080时显示空白页。

任何人都可以告诉我,我如何配置tomcat以使其正常工作?

1 个答案:

答案 0 :(得分:2)

我最近遇到了同样的问题。如果你习惯了yum但不习惯手动安装应用程序,你可以在下面找到我如何使用yum解决问题:

# yum search tomcat

Loaded plugins: langpacks, refresh-packagekit
tomcat-native.x86_64 : Tomcat native library
jglobus-ssl-proxies-tomcat.noarch : Globus Java - SSL and proxy certificate support for Tomcat
jspc-compiler-tomcat6.noarch : JSPC Compiler for Tomcat6
openwebbeans-tomcat7.noarch : Apache OpenWebBeans Tomcat 7 plugin
springframework-instrument-tomcat.noarch : Spring Instrument Tomcat Weaver
**tomcat-admin-webapps.noarch : The host-manager and manager web applications for Apache Tomcat**
tomcat-docs-webapp.noarch : The docs web application for Apache Tomcat
tomcat-javadoc.noarch : Javadoc generated documentation for Apache Tomcat
tomcat-jsp-2.2-api.noarch : Apache Tomcat JSP API implementation classes
tomcat-jsvc.noarch : Apache jsvc wrapper for Apache Tomcat as separate service
tomcat-lib.noarch : Libraries needed to run the Tomcat Web container
tomcat-servlet-3.0-api.noarch : Apache Tomcat Servlet API implementation classes
**tomcat-webapps.noarch : The ROOT and examples web applications for Apache Tomcat**
tomcatjss.noarch : JSSE implementation using JSS for Tomcat
pki-tps-tomcat.noarch : Certificate System - Token Processing Service
tomcat.noarch : Apache Servlet/JSP Engine, RI for Servlet 3.0/JSP 2.2 API
tomcat-el-2.2-api.noarch : Expression Language v1.0 API

因为我遇到了这种依赖冲突:

Error: tomcatjss conflicts with tomcat-native-1.1.30-1.fc20.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

我使用skip-broken标志运行yum install:

# yum install --skip-broken tomcat*

现在

之后
# service tomcat restart

Tomcat起始页面按预期显示。