Is it correct that most of Unix&Linux software supports x-copy deployment? If I download the installation package and uncompress the files into a particular directory - would that be enough to start using that software?

  • Just for clarification, tar,tar.z,tgz,tar.gz etc are archives and do not necessarily contain installable software, they could just be backups for example. – terdon Aug 27 '13 at 14:20
  • MOVED: Just remember that you can cause compatibility problems by doing that. If you get a program from an Ubuntu .deb that relies on another program that you get from a RHEL .rpm, there may be strange and dangerous errors. Even with only one package, it might be built to run on a tailored framework. – Wutaz Aug 27 '13 at 16:22
  • 1
    What is an “x-copy deployment”? – Gilles 'SO- stop being evil' Aug 27 '13 at 22:15
  • @Gilles x-copy deployment is an installation method simply by copying files. as opposed to more cumbersome methods, e.g. on Windows once files are copied some of the needs to be registered in a registry, etc, which prohibits moving the installed software from one file location to another and usually adds unnecessary layer of complexity. – Mitten Aug 28 '13 at 9:53

That is true for binary builds of packages. Typically:

  • .rpm for Red Hat based distros
  • .deb for Ubuntu/Debian based distros
  • sometimes .tar.gz files (only if they're binary builds)

Often when you download a .tar.gz, .tar.bz2, etc. these are source distributions, so will need to be configured and compiled. Once they go through these steps they're often meant to be run from a specific directory such as /usr/bin or /usr/local/bin.

They can be moved around but then the $PATH and $LD_LIBRARY_PATH will need to by dynamically changed to reflect their new locations so that any shared libraries they depend on can be found.

Binary builds?

Both .deb and .rpm provide source packages in a binary form, so that you can build a custom binary package more easily. These packages are typically named something like .srpm, on Red Hat based distros, and their is tooling to assist in building these into .rpm packages more easily. There is something similar on Ubuntu/Debian as well.

  • @Wutaz - I think you're misunderstanding what I said. Did some portion of my answer make you think I was suggesting you could take the .deb files and install them on RH systems and vice verse with the .rpm flies on Ubuntu/Debian? I know this is technically possible but I wasn't trying to mention this. – slm Aug 27 '13 at 15:55
  • @Wutaz - yeah I'd move the comments up there and then delete these. They confuse the context of my answer since they aren't really relevant to it. Once you've moved them I'll delete these comments that I left. – slm Aug 27 '13 at 16:08

The normal way to deploy a program is a package tailored for each distribution: rpm format for Red Hat and CentOS and SuSE and others, deb format for Debian and Ubuntu and Mint and others, etc.

In addition to providing the files, such packages provide many other services, such as:

  • Record where the package is installed and track versions and updates.
  • Ensure that dependencies (e.g. libraries needed by programs) are present.
  • Track which files belong to which package.
  • Register and if applicable compile plugins, modules, libraries, etc.
  • Register documentation in documentation indices.
  • Register menu entries for interactive software.
  • Register startup scripts for daemons.
  • Register file types for applications provided in the package that can edit or view files.
  • etc.

Basic archives such as .tar.gz work too, but they provide none of these services, so you need to do all of this manually. They're good enough to run most programs manually (if you took care of installing their dependencies) but no more.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.