Silent install macOS and Linux builds

Sometimes you may need to install a product without any user interaction. This may be done by running a shell script that contains the right command.

Mac

For Mac the script will look like this:

#!/bin/bash
installer -package /path/to/the/package/package_name.pkg -target /
exit 0

The path and the name of the package may be different, for example:

sudo installer -package /Users/username/mac_CloudBerryLab_CloudBerryBackup_v2.9.0.80_20190408031652.pkg -target /

Note: Make sure to run the script with sudo rights or as the root user - the installer requires root permissions to install packages. When installing packages with the graphic installer, the latter will also require the same permissions.

Linux

Linux build is installed using package manager (e.g. dpkg, rpm, etc). So you may need to check environment variables for those package managers to ignore questions during installation. For example for Debian family the following should disable questions and perform an unattended installation:

export DEBIAN_FRONTEND=noninteractive
export DEBIAN_PRIORITY=critical

The basic install command for Debian-based distributions will be this:

sudo dpkg --install /path/to/the/package/package_name.deb

The basic install command for RHEL-based distributions will be this:

sudo rpm --install /path/to/the/package/package_name.rpm

Note: in order to run the command as a script it may need a shell specified and an exit status, so the full script should look like this:

#!/bin/bash
dpkg --install /path/to/the/package/package_name
exit 0

Note: Make sure to run the script with sudo rights or as the root user - the package managers require root permissions to install packages.

https://git.cloudberrylab.com/egor.m/doc-help-kb.git