在没有用户干预的情况下使用apt-get安装mailutils
问题描述:
使用apt-get在ubuntu 12.04上安装mailutils时,需要手动干预的两个实例,第一个选择站点配置,第二个输入框的主机名。有没有办法使安装自动化?我需要在许多服务器上安装该软件包,并且是一个n00b系统管理员,但我还没有找到解决方案。我可以从源代码制作和安装,但它还有其他问题。感谢名单。在没有用户干预的情况下使用apt-get安装mailutils
答
您可以使用debconf-set-selections
预先选择的答案:
$ debconf-set-selections <<< "postfix postfix/mailname string your.hostname.com"
$ debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"
$ apt-get install -y mailutils
的可能重复[我怎样可以自动的dpkg/apt-get的?](http://stackoverflow.com/questions/702248/how-可以-I-自动化-的dpkg-apt-get的) – tripleee 2016-01-21 17:19:35