Linux下实现软件的静默安装

静默安装,可以使用下面的方案:
1、用debconf-show + 包名查出预配置项
root@compute204:/var/log/keystone# debconf-show slapd
* slapd/password1: (password omitted)
slapd/internal/adminpw: (password omitted)
slapd/internal/generated_adminpw: (password omitted)
* slapd/password2: (password omitted)

...


2、在脚本里,用debconf-set-selections设置然后安装,格式为 {包名} {配置项key} {配置项类型} {配置项value}
cat < slapd slapd/password1 password ${LDAP_PASS}
slapd slapd/password2 password ${LDAP_PASS}
LDAP_PRESEED


3、安装

apt-get -y --force-yes install slapd
apt-get -y --force-yes install ldap-utils

你可能感兴趣的:(Linux)