How to use the Installer command to deploy packages silently on macOS and OS X
By utilizing a number of third-party administration suites, it is pretty straightforward to deploy software program functions to Mac computer systems. Apple’s native answer, Apple Remote Desktop, gives a lot of the identical capabilities at a fraction of the worth and with fewer setup necessities.
If your group lacks the obligatory infrastructure or, should you simply want a fast, easy answer to deploy a couple of packages to your macOS gadgets, the Installer command is an effective way to get apps pushed out in a pinch or scripted out to goal gadgets, as wanted.
Best of all, since the command runs on Terminal, and that app is included with all variations of macOS and OS X, it’s free to use. Furthermore, all trendy and legacy variations of the OS are supported, making it a boon for IT professionals that should assist varied variations of Apple’s working system in the enterprise.
SEE: System monitoring coverage (Tech Pro Research)
Before leaping straight to the command and its syntax, you may want to adhere to these necessities.
- Apple laptop with OS X or macOS
- Administrator credentials
- Applications to set up in .PKG or .MPKG format
SEE: Top 20 Apple keyboard shortcuts for enterprise customers (free PDF) (TechRepublic)
How to deploy packages by way of Terminal
1. Launch Terminal.app.
2. Enter the following command to set up it as an administrator.
installer -pkg /path/to/software.pkg -target /Applications
three. When prompted, enter the administrator password, or prefix the command in step #2 with sudo to immediate for the admin credential should you’re putting in remotely by way of script or SSH.
Note: For .MPKG deployments, specify the default .mpkg solely, and all different dependent .mpkg recordsdata can be routinely put in until they’re disqualified by the integrity checking course of.
How to deploy packages with logging
By default, functions put in utilizing the Installer command are written to the occasion logger as an set up. If you want to allow secondary logging to a centralized location or syslog server for verification, this may be achieved by putting the following flag as a suffix to the Installer command.
installer -pkg /path/to/software.mpkg -target /Applications -dumplog /Volumes/Server/Share/installer.log
Have you utilized the Installer command in your group? What suggestions or finest practices do you’ve gotten for deploying apps throughout the community utilizing this methodology? Please share your ideas in the feedback.