问题描述
我已经编写了一个到目前为止还不是开源的应用程序,并且我想在各种Linux发行版中分发可执行文件.最好的方法是什么,我已经看过.rpm和.deb打包了,但是我找不到是否可以将其用于二进制文件.理想情况下,我想要OS X上的PackageMaker或Windows上的常规安装程序之类的工具,将其自动复制到/usr/bin中.那是.rpm和.deb软件包的目的,还是我必须捆绑将自动执行的shell脚本?
I've written an application which as of yet is not open source and I'd like to distribute the executable across various linux distros. What's the best way to do this, I've looked a little bit at .rpm and .deb packaging but I can't find if that can be used for binaries or not. Ideally I'd like something like the PackageMaker on OS X or a regular installer on windows that will have it automatically copy into /usr/bin. Is that what .rpm and .deb packages are for or do I have to bundle a shell script that will do it automatically?
推荐答案
RPM和DEB软件包是在Linux中分发二进制软件包的两种主要机制. RedHat及其衍生版本(Fedora,CentOS)使用RPM,而Debian和Ubuntu使用DEB.
RPM and DEB packages are the two primary mechanisms for distributing binary packages in Linux. RPM is used by RedHat and its derivatives (Fedora, CentOS), while DEB is used in Debian and Ubuntu.
.rpm和.deb文件本身通常是哑"存档,并通过预安装的帮助程序安装到文件系统中的正确位置.您不必担心编写脚本来安装文件,除非它是一个非常复杂的应用程序,需要按系统进行特殊配置.
The .rpm and .deb files themselves are generally "dumb" archives, and are installed to the correct locations in the filesystem by pre-installed helper applications. You don't have to worry about writing scripts to install files, unless it's a very complicated application which needs special per-system configuration.
我看到的分发二进制文件的常用模式是:
The usual patterns I see for distributing binaries are:
- 发布经过评估的tarball(.tar.gz或.tar.bz2),然后让分发打包者担心这些细节.这对于流行的应用程序效果很好,但是,如果它是新发布的,那么没有人会足够在意您的应用程序来打包它.
- 作为tarball发行,再加上RPM和/或DEB软件包(取决于客户需求).具有受支持的发行版的客户可以安装预制软件包.无论如何,使用反常发行版的任何人都可能很乐意从tarball安装.
这篇关于在Linux发行版之间分发二进制应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!