自动安装 phpmyadmin

自动安装 phpmyadmin

我正在使用以下命令安装 phpmyadmin,但安装中断了......

debconf-set-selections <<< "phpmyadmin phpmyadmin/debconfig-install boolean true"
debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/admin-user string root"
debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/admin-pass password root"
debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/app-pass password root"
debconf-set-selections <<< "phpmyadmin phpmyadmin/app-password-confirm password root"
debconf-set-selections <<< "phpmyadmin phpmyadmin/reconfigure-websever multiselect apache2"
debconf-set-selections <<< "phpmyadmin phpmyadmin/database-type select mysql"
debconf-set-selections <<< "phpmyadmin phpmyadmin/setup-password password root" 

但是,当我使用下面我在网上找到的内容时,它的安装非常好......

debconf-set-selections <<< "phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2"  
debconf-set-selections <<< "phpmyadmin phpmyadmin/dbconfig-install boolean true"  
debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/admin-user string root"  
debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/admin-pass password root"  
debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/app-pass password root"  
debconf-set-selections <<< "phpmyadmin phpmyadmin/app-password-confirm password root"

我想知道在第一个例子中我做错了什么导致自动安装失败,以及如何找出其他软件安装所需的 debconf-set-selections?我知道我可以通过以下方式找出特定软件包的所有选择

sudo debconf-get-selections | grep phpmyadmin

但是,这并没有向我展示实现自动安装所需的全部内容。

答案1

在命令的第一行中,dbconfig-install 命令中有一个多余的“e”:

debconf-set-selections <<< "phpmyadmin phpmyadmin/debconfig-install boolean true"

应该:

debconf-set-selections <<< "phpmyadmin phpmyadmin/dbconfig-install boolean true"

希望这可以帮助。

相关内容