Ubuntu 的打包 - Web 应用程序

发布于 2024-09-04 10:41:02 字数 592 浏览 8 评论 0 原文

Web 应用程序没有与 C++ 或类似文件不同的 make 文件。但是,它需要放置到特定的目录中...例如/var/www。

我是 Linux 打包新手,所以我的问题是,如何将我的应用程序打包到 .deb 中,以便在安装时将其放入 /etc/myprogram/bundles/myprogram-3.4 之类的文件中?我的特别是一个在 apache tomcat 上运行的 java 应用程序。

我通过仔细阅读 http:// 中的每个单词,成功创建了一个 .deb 文件。 www.debian.org/doc/manuals/maint-guide。然而,当我按照说明进行操作时,我最终得到

1) 一个 1.7kb 的 .deb 文件,而不是应有的 ~240mb,因为显然它缺少我的所有源代码。 2)很困惑,因为我不知道我是否应该编写某种makefile。我什至不知道去哪里学习这个问题的答案,然后我必须处理如何编写 makefile。

我已经在 ubuntuforums 上发布了类似的问题,但我觉得我更有可能在这里得到答复。

A web application has no make file unlike C++ or anything like that. However, it needs to be placed into specific directories...e.g /var/www.

I'm new to linux packaging, so my question is, how do I package my app into a .deb such that when its being installed, it gets put into something like /etc/myprogram/bundles/myprogram-3.4? Mine in particular is a java app running on apache tomcat.

I've managed to create a .deb file by reading painstakingly every word in http://www.debian.org/doc/manuals/maint-guide. However when I follow the instructions I end up getting

1) a .deb file that is 1.7kb instead of the ~240mb that it should be, because apparently it is lacking all my source code.
2) confused because I don't know whether I was supposed to write some sort of makefile. I am not even sure where to go about learning the answer to that question, and then I'd have to deal with how to write a makefile.

I've posted a similar question to ubuntuforums, but I feel like I'm more likely to get a response here.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

忆离笙 2024-09-11 10:41:02

我使用以下命令从 Ubuntu 10.04LTS 上的 Java 项目创建了 .deb 包:

  1. cd $PROJECT_DIR
  2. sudo checkinstall -D javac *.java

I've created .deb packages from a Java project on Ubuntu 10.04LTS with the following commands:

  1. cd $PROJECT_DIR
  2. sudo checkinstall -D javac *.java
絕版丫頭 2024-09-11 10:41:02

Java程序的构建工具是ANT。使用 ANT,您可以构建 WAR 文件并将其部署到 Tomcat。

以下是其外观的简要介绍: http://javabeanz.wordpress.com/2009/02/12/how-to-create-a-war-file-using-ant/
以下是使用 ANT 构建 war 文件的教程: http://techtracer.com/2007/04/16/the-great-ant-tutorial-a-great-jump-start/

The build tool for Java programs is ANT. With ANT you build a WAR file and deploy that to Tomcat.

Here is a brief glimpse at how it looks: http://javabeanz.wordpress.com/2009/02/12/how-to-create-a-war-file-using-ant/
and here is a tutorial on building a war file with ANT: http://techtracer.com/2007/04/16/the-great-ant-tutorial-a-great-jump-start/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文