2013-03-18 56 views
6

使用apt-get在ubuntu 12.04上安裝mailutils時,需要手動干預的兩個實例,第一個選擇站點配置,第二個輸入框的主機名。有沒有辦法使安裝自動化?我需要在許多服務器上安裝該軟件包,並且是一個n00b系統管理員,但我還沒有找到解決方案。我可以從源代碼製作和安裝,但它還有其他問題。感謝名單。在沒有用戶干預的情況下使用apt-get安裝mailutils

+0

的可能重複[我怎樣可以自動的dpkg/apt-get的?](http://stackoverflow.com/questions/702248/how-可以-I-自動化-的dpkg-apt-get的) – tripleee 2016-01-21 17:19:35

回答

8

您可以使用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 
相關問題