Tomcat 无法提取 .war 文件
我们的办公室与 Alfresco 合作,并获得了安装其软件的企业许可证。我们正在使用 RHEL6 应用程序服务器,通过命令 yum install tomcat*
安装 tomcat6 以及必要的 java 包:
java-1.5.0-gcj.x86_64 1.5.0.0-29.1.el6 @distro
java-1.6.0-openjdk.x86_64 1:1.6.0.0-1.39.1.9.8.el6_1 @updates
java-1.6.0-sun.x86_64 1:1.6.0.26-1jpp.1.el6 @supplementary
java-1.6.0-sun-devel.x86_64 1:1.6.0.26-1jpp.1.el6 @supplementary
java-1.6.0-sun-jdbc.x86_64 1:1.6.0.26-1jpp.1.el6 @supplementary
java_cup.x86_64 1:0.10k-5.el6 @distro
tomcat6-javadoc.noarch 6.0.24-33.el6 @optional
tzdata-java.noarch 2011g-1.el6 @distro
apache-tomcat-apis.noarch 0.1-1.el6 @distro
tomcat6.noarch 6.0.24-33.el6 @distro
tomcat6-admin-webapps.noarch 6.0.24-33.el6 @optional
tomcat6-docs-webapp.noarch 6.0.24-33.el6 @optional
tomcat6-el-2.1-api.noarch 6.0.24-33.el6 @distro
tomcat6-javadoc.noarch 6.0.24-33.el6 @optional
tomcat6-jsp-2.1-api.noarch 6.0.24-33.el6 @distro
tomcat6-lib.noarch 6.0.24-33.el6 @distro
tomcat6-servlet-2.5-api.noarch 6.0.24-33.el6 @distro
tomcat6-webapps.noarch 6.0.24-33.el6 @optional
tomcatjss.noarch 2.1.0-1.el6 @distro
将 .war 文件正确解压到 tomcat 的 webapps 目录(以及所有其他目录)后目录(包括共享,lib等...)并通过命令service tomcat6 restart
重新启动tomcat,它无法提取webapps内的alfresco.war和share.war目录。我看过一些文章讨论了如何使用我的 tomcat6 目录中任何地方都不存在的startup.sh 脚本,并且我认为通过上述命令重新启动是等效的。关于如何使用 yum 版本的 tomcat6 在 RHEL6 上提取 tomcat 有什么可能的想法吗?顺便说一句,正如 stackoverflow 上其他地方提到的,我还在 /etc/profile 文件中设置了以下变量:
export CATALINA_HOME=/var/www/tomcat6
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-sun-1.6.0.26.x86_64/
$JAVA_HOME
包含目录:bin、include、jre 和 lib,假设是我需要考虑我的JAVA_HOME。我错了吗?
Our office has partnered with Alfresco and have been given enterprise licenses to install their software. We are working off of RHEL6 application servers with tomcat6 installed via the command yum install tomcat*
as well as the necessary java packages:
java-1.5.0-gcj.x86_64 1.5.0.0-29.1.el6 @distro
java-1.6.0-openjdk.x86_64 1:1.6.0.0-1.39.1.9.8.el6_1 @updates
java-1.6.0-sun.x86_64 1:1.6.0.26-1jpp.1.el6 @supplementary
java-1.6.0-sun-devel.x86_64 1:1.6.0.26-1jpp.1.el6 @supplementary
java-1.6.0-sun-jdbc.x86_64 1:1.6.0.26-1jpp.1.el6 @supplementary
java_cup.x86_64 1:0.10k-5.el6 @distro
tomcat6-javadoc.noarch 6.0.24-33.el6 @optional
tzdata-java.noarch 2011g-1.el6 @distro
apache-tomcat-apis.noarch 0.1-1.el6 @distro
tomcat6.noarch 6.0.24-33.el6 @distro
tomcat6-admin-webapps.noarch 6.0.24-33.el6 @optional
tomcat6-docs-webapp.noarch 6.0.24-33.el6 @optional
tomcat6-el-2.1-api.noarch 6.0.24-33.el6 @distro
tomcat6-javadoc.noarch 6.0.24-33.el6 @optional
tomcat6-jsp-2.1-api.noarch 6.0.24-33.el6 @distro
tomcat6-lib.noarch 6.0.24-33.el6 @distro
tomcat6-servlet-2.5-api.noarch 6.0.24-33.el6 @distro
tomcat6-webapps.noarch 6.0.24-33.el6 @optional
tomcatjss.noarch 2.1.0-1.el6 @distro
After properly extracting the .war files into tomcat's webapps directory (as well as all other directories including shared, lib, etc...) and restarting tomcat via the command service tomcat6 restart
it fails to extract the alfresco.war and share.war inside of the webapps directory. I've seen articles discuss use of a startup.sh script that does not exist anywhere within my tomcat6 directory, and I assumed that restarting via the aforementioned command would be the equivalent. Any possible ideas on how to get tomcat to extract on RHEL6 using the yum version of tomcat6? By the way, as mentioned elsewhere on stackoverflow, I have also set the following variables in the /etc/profile file:
export CATALINA_HOME=/var/www/tomcat6
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-sun-1.6.0.26.x86_64/
$JAVA_HOME
contains the directories: bin, include, jre, and lib, assuming that is what I need to consider my JAVA_HOME. Am I mistaken?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您不能只使用他们的 Linux 安装程序 (*.bin) 文件吗?
可以通过合作伙伴网站下载。
将其制作/提取到您想要的位置,然后只需使用它们的设置即可。
如果您使用早期版本的 Alfresco,例如 3.3.x,那么所有正确的 tomcat 可运行脚本都将就位
Can't you just use their Linux installer (*.bin) file?
It can be downloaded through the partner network site.
Make it/extract it to the place you want and then just use their settings.
If you take an earlier version of Alfresco e.g. 3.3.x then all the right tomcat runnable scripts will be in place
我会检查您的 tomcat 日志,特别是与权限相关的内容。如果您手动复制了 war 文件,这些文件可能是错误的,特别是对于 RHEL 提供的服务(RHEL 往往具有非常严格的安全性,例如使用 SELinux)
您也可以尝试获取“hello world”类型的 java 应用程序作为一场战争,看看部署是否正确。这样您就可以先解决部署问题,然后再担心是否已正确设置 Alfresco 使其在部署后启动。
I'd check your tomcat logs, especially for permissions related things. If you've copied the war files in by hand, these might be wrong, especially with a RHEL supplied service (RHEL tends to be pretty tight security wise, eg with SELinux)
You could also try grabbing a "hello world" type java app as a war, and see if that deploys properly. That way you can fix your deployment issues first, before you have to worry about if you've setup Alfresco correctly for it to start once deployed.
就我而言,将文件复制到服务器效果不佳,
请确保正确复制 .war 文件(通过校验和)
或使用更好的工具来传输文件。
scp 命令非常适合通过 ssh 传输文件
In my case, copying the file to the server was working bad
make sure you are copying the .war file correctly (by checksum)
or use a better tool to transfer your file.
scp command is great for transferring file via ssh