0
我想創建一個腳本來自動安裝LAMP服務器,並在debian中未登錄。debconf-set-selections不能與phpmyadmin一起工作
問題是我意識到debconf-set-selections似乎不適用於phpmyadmin。
事實上,如果我跑..
debconf-get-selections | grep phpmyadmin
..它不返回任何東西,它應該返回,你可以選擇和使用可用的選項。
有沒有可能在debconf的最新版本中phpmyadmin不可用?
這是我的代碼,它什麼都不做。我的意思是,它仍然要求提供的選項:
def installPHPMyAdmin():
subprocess.call("debconf-set-selections <<< " +
"\"phpmyadmin phpmyadmin/dbconfig-install boolean true\"")
subprocess.call("debconf-set-selections <<< \"phpmyadmin phpmyadmin/mysql/admin-pass " +
"password " + mysqlPass + "\"")
subprocess.call("debconf-set-selections <<< \"phpmyadmin phpmyadmin/mysql/app-pass " +
"password " + phpMyAdminPass + "\"")
subprocess.call("debconf-set-selections <<< \"phpmyadmin phpmyadmin/app-password-confirm " +
"password " + phpMyAdminPass + "\"")
subprocess.call("debconf-set-selections <<< \"phpmyadmin phpmyadmin/reconfigure-webserver " +
"multiselect none\"")
return subprocess.call("apt-get install -y phpmyadmin")
看看這篇文章https://stackoverflow.com/a/49136923/454421你可能使用了錯誤的配置密鑰。 –