a command-line tool to install .pkg file to a specified domain or volume.
installer [option]... -pkg <FILE> -target <DIR>
示例:
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
sudo installer -pkg "/Volumes/JDK 8 Update 91.pkg" -target /Applications