What is the right way to make an installer for Linux?

likithrao

New Member
Joined
Oct 14, 2022
Messages
2
Reaction score
0
Credits
29
I'm developing an application that runs on the server as a Windows service or a Linux daemon.

It is common to make an installer for Windows using NSIS/WIX/InnoSetup/etc to get an installer as a single EXE/MSI file. The question is what is the common way for Linux to make such an installer?

The installer must get some information from the user (configuration settings) and then write files to the target directory, write initial config files, and run the service/daemon.

The question is not related to the packages for the apt/yum/etc package manager. At this moment I want to make a separate installer that can be used for the different Linux distributives.
 


I don't know how to do that, but there are several packaging methods, you could use as an installer. Look into them and decide on that knowledge

1) AUR
2) Flatpak
3) Snap
4) .Appimage

  • Flatpak, Snaps and Appimage aren't limited to any Distro and are probably what you are searching for
  • AUR is a User repo for Arch based Distros, anyone can use and upload there
  • If you want to distribute an deb package, you could host a additional apt-repo hosting the packages

I hope that helps
 
you could have a go with make is common for some developers when distributing applications.
I would not say its the easiest though, but it works well
 
Welcome to the forums. (Almost forgot about this.)

Augmenting what has been said already:

AppImage is the closest thing to Windows installer (which is an M$ thing only). It has all the libraries and data files needed by an application, bundled into one file, which is "plugged in" as a loopback device. The drawback is that because it has to include "everything" the footprint on disk is rather large. It doesn't use libraries it requires which are already installed in a Linux OS, it uses the libraries contained inside the AppImage. An advantage is that it could be easily installed or uninstalled by a regular user, and it doesn't require special permissions.

Flatpak is a more mysterious monster. It is becoming more popular as a way to distribute applications. Usually the GNOME Platform is installed which is 300MB or larger in size. What's worse is that there are different versions of this Platform according to the age of the application, which could consume serious disk space. There has to be a counterpart from KDE but I haven't seen it yet because I have installed Cowsay and almost nothing else via this method. Flatpaks have to be handled through "flatpak" command.

I know less about Snaps but they should be similar; they are installed in a way which gives the user less control of the situation which is a good reason why there is opposition to it. This is good for people taking up Ubuntu as their first experience with Linux.

The Arch Linux User Repository (AUR) is an extension of the standard repositories which provides functionality which is less on demand and/or which could be obsoleted in years, or which is specialized. Usually programs have to be built for the target system. It does seldom involve binary blobs such as that for Brave Browser. The drawback is that it's not for distros not based on Arch Linux. Only the most profound Linux experts could check out what needs to be done to make it work on a Linux OS not Arch Linux nor based on it.

There are other packaging systems like DEB (via "apt") and RPM (via "dnf/yum/urpmi/zypper"), and the tarballs used by Slackware. But they have their differences from each other which are handled by Linux experts who are determined to obtain functionality and are prepared to fix what breaks out of their efforts.
 

Staff online

Members online


Top