本文介绍了JBoss AS 7:如何清理tmp?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到在 standalone / tmp 下的JBoss Application Server 7安装中,我有400 MB的文件与过去的部署相关,其中一些文件只有几个月。

I noticed that in my JBoss Application Server 7 installation under standalone/tmp I have 400 MB of files related to past deployments, some of them a few months old.

如何清理?它应该自动发生吗?它有工具吗?我可以自己删除所有这些文件吗?

How is it cleaned up? Should it happen automatically? Is there a tool for it? Can I just remove all those files myself?

推荐答案

如您所知JBoss是一个纯文件系统安装。要安装你只需解压缩一个文件就可以了。安装后,默认情况下会创建某个文件夹结构,并且当您第一次运行JBoss实例时,它会为运行时操作创建其他文件夹。为了比较,这里是JBoss AS 7首次启动前后的结构

As you know JBoss is a purely filesystem based installation. To install you simply unzip a file and thats it. Once you install a certain folder structure is created by default and as you run the JBoss instance for the first time, it creates additional folders for runtime operation. For comparison here is the structure of JBoss AS 7 before and after you start for the first time

之前

jboss-as-7
 |
 |---> standalone
 |      |----> lib
 |      |----> configuration
 |      |----> deployments
 |
 |---> domain
 |....

之后

jboss-as-7
     |
     |---> standalone
     |      |----> lib
     |      |----> configuration
     |      |----> deployments
     |      |----> tmp
     |      |----> data
     |      |----> log
     |
     |---> domain
     |....

正如您所见,您可以看到3个新文件夹(日志) ,数据& tmp)。除非您的应用程序生成存储在这些文件夹中的数据,否则可以删除这些文件夹而不影响部署文件夹中部署的应用程序。在开发中,可以删除所有这3个新文件夹,假设您不需要存储在data目录中的日志和数据。

As you can see 3 new folders are created (log, data & tmp). These folders can all be deleted without effecting the application deployed in deployments folder unless your application generated Data that's stored in those folders. In development, its ok to delete all these 3 new folders assuming you don't have any need for the logs and data stored in "data" directory.

对于生产,不建议删除这些文件夹,因为应用程序生成的数据可能存储应用程序的某些状态。例如,在数据文件夹中,appserver可以保存关键的Tx回滚日志。如果你因为生产中的任何原因需要删除这些文件夹,请联系你的JBoss管理员。

For production, ITS NOT RECOMMENDED to delete these folders as there maybe application generated data that stores certain state of the application. For ex, in the data folder, the appserver can save critical Tx rollback logs. So contact your JBoss Administrator if you need to delete those folders for any reason in production.

祝你好运!

这篇关于JBoss AS 7:如何清理tmp?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 00:15