installer
1.1、installer命令的作用

a command-line tool to install .pkg file to a specified domain or volume.

1.2、installer命令的使用格式
installer [option]... -pkg <FILE> -target <DIR>
1.2.1、installer -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