sut*_*tch 74 automation ubuntu postfix installation apt
我的系统配置脚本执行“apt-get install -y postfix”。不幸的是,当 postfix 安装程序显示配置屏幕时,脚本会停止。有没有一种方法可以强制 postfix 在安装过程中使用默认值,以便自动化脚本可以持续到最后?
postfix 安装程序是否可能会检查 /etc/postfix 中的现有配置,如果存在,不要用配置屏幕打扰用户?
rap*_*ink 98
您可以为此使用预播种,debconf-set-selections在安装包之前使用命令预先回答 debconf 提出的问题。
例如:
debconf-set-selections <<< "postfix postfix/mailname string your.hostname.com"
debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"
apt-get install --assume-yes postfix
Run Code Online (Sandbox Code Playgroud)
Dav*_*man 30
如果你想在全球范围内这样做:
dpkg-reconfigure debconf
Run Code Online (Sandbox Code Playgroud)
然后将其配置为“非交互式”
如果您只想将其用于单次安装运行:
DEBIAN_FRONTEND=noninteractive apt-get install PACKAGE
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
36134 次 |
| 最近记录: |