从 U 盘运行 Tomcat [英] Running Tomcat from USB Flash Drive

查看:28
本文介绍了从 U 盘运行 Tomcat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 Tomcat 设置为直接从 USB 闪存驱动器工作.我知道可以从 USB 闪存运行 apache + mysql + php,但是 tomcat 呢?

我发现这个链接包含一些解释,但下载源代码或 bin 的链接不起作用.

http://www.javalobby.org/articles/tomcat2go/

通过在互联网上搜索了一下,我设法在一个不起眼的站点中找到了无法正常工作的二进制文件,可能需要修改 src 才能使其正常工作.

有谁知道:

  1. 在哪里可以找到那篇文章的源代码?

  2. 是否有任何从 USB 闪存运行的 Tomcat 实现,以及是否有任何用户体验.

提前致谢.

解决方案

那篇文章似乎描述了一种打包/安装 Tomcat 的方法,使其看起来像一个可执行文件.这是你想做的吗?

因为如果您只想在 USB 驱动器上安装 Tomcat,那真的很容易.

您需要一份 Tomcat 的副本,您可以在此处获取:http://tomcat.apache.org/

而且你需要一个 JDK,你可以在这里得到它(确保你只得到 J2SDK,没有任何 J2EE 的东西):http://java.sun.com/javase/downloads/index.jsp

如果您在 Windows 上运行,则将 Java 安装到您的硬盘驱动器并将 SDK 目录复制到 USB 上(这是因为 Java 安装程序设置了一些注册表项以指向安装).

在运行之前,您需要将 JAVA_HOME 设置为指向 USB 驱动器.这可以通过 USB 上的批处理脚本来完成.

I am trying to setup Tomcat to work straight from a USB flash drive. I know that is possible to run apache + mysql + php from USB flash, but what about tomcat?

I found this link which contains some explanations but the links to download the sourcecode or the bin are not working.

http://www.javalobby.org/articles/tomcat2go/

By searching a bit the Internet I managed to find in obscure site the binary which is not working and probably the src needs to be modified to be make it work.

Does anyone know:

  1. where to find the src of that article ?

  2. If there is any implementation of Tomcat running from a usb flash, and in case any user experience from it.

Thank you in advance.

解决方案

That article appears to describe a way to package/install Tomcat so that it appears to be an executable. Is this what you want to do?

Because if all you want to do is install Tomcat on a USB drive, it's really easy.

You need a copy of Tomcat, which you can get here: http://tomcat.apache.org/

And you need a JDK, which you can get here (make sure you just get the J2SDK, without any J2EE stuff): http://java.sun.com/javase/downloads/index.jsp

If you're running on Windows, then install Java to your hard drive and copy the SDK directory onto the USB (this is because the Java installer sets some registry entries to point to the install).

Before you run, you'll need to set JAVA_HOME to point to the USB drive. This can be done with a batch script on the USB.

这篇关于从 U 盘运行 Tomcat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆