想要从 bash 脚本安装 phpmyadmin,我发现很难获得正确的 debconf 选择,以便不安装/配置任何 Web 服务器(使用 nginx,只有 apache2 和 lighttpd 可用)并且没有使用 dbconfig 配置 phpmyadmin 数据库-很常见,因为我在 Google 上没有找到类似的东西。
这是 Ubuntu 14.04 phpmyadmin 4:4.0.10-1 上的 debconf 选择的完整列表:
debconf-get-selections | grep phpmyadmin
phpmyadmin phpmyadmin/password-confirm password
# MySQL application password for phpmyadmin:
phpmyadmin phpmyadmin/mysql/app-pass password
phpmyadmin phpmyadmin/mysql/admin-pass password
phpmyadmin phpmyadmin/setup-password password
phpmyadmin phpmyadmin/app-password-confirm password
# Database type to be used by phpmyadmin:
phpmyadmin phpmyadmin/database-type select mysql
# Reinstall database for phpmyadmin?
phpmyadmin phpmyadmin/dbconfig-reinstall boolean false
phpmyadmin phpmyadmin/remove-error select abort
phpmyadmin phpmyadmin/reconfigure-webserver multiselect
phpmyadmin phpmyadmin/missing-db-package-error select abort
# Configure database for phpmyadmin with dbconfig-common?
phpmyadmin phpmyadmin/dbconfig-install boolean false
phpmyadmin phpmyadmin/upgrade-error select abort
# Perform upgrade on database for phpmyadmin with dbconfig-common?
phpmyadmin phpmyadmin/dbconfig-upgrade boolean true
# Deconfigure database for phpmyadmin with dbconfig-common?
phpmyadmin phpmyadmin/dbconfig-remove boolean
phpmyadmin phpmyadmin/remote/port string
phpmyadmin phpmyadmin/internal/skip-preseed boolean true
# Do you want to back up the database for phpmyadmin before upgrading?
phpmyadmin phpmyadmin/upgrade-backup boolean true
phpmyadmin phpmyadmin/setup-username string admin
# Host name of the MySQL database server for phpmyadmin:
phpmyadmin phpmyadmin/remote/host select
# MySQL database name for phpmyadmin:
phpmyadmin phpmyadmin/db/dbname string
phpmyadmin phpmyadmin/mysql/admin-user string root
phpmyadmin phpmyadmin/install-error select abort
# Host running the MySQL server for phpmyadmin:
phpmyadmin phpmyadmin/remote/newhost string
# MySQL username for phpmyadmin:
phpmyadmin phpmyadmin/db/app-user string
# Connection method for MySQL database of phpmyadmin:
phpmyadmin phpmyadmin/mysql/method select unix socket
phpmyadmin phpmyadmin/internal/reconfiguring boolean false
# Do you want to purge the database for phpmyadmin?
phpmyadmin phpmyadmin/purge boolean false
phpmyadmin phpmyadmin/passwords-do-not-match error
注意:为了运行debconf-get-selections
,您需要该debconf-utils
软件包(在 Ubuntu/Debian 上可能与其他 Debian 基本发行版上相同),运行apt-get install debconf-utils
(对于那些将从脚本执行此操作的人没有安装提示)。