Debconf to automatically install phpmyadmin without a web server installed and without dbconfig-common

Wanting to install phpmyadmin from a bash script, it was difficult for me to get the correct debconf options so as not to install or install any web server (using nginx, only apache2 and lighttpd), and not have a phpmyadmin database configured with dbconfig-common because I did not find anything like it on Google.

Here is the complete list with debconf selection on Ubuntu 14.04 phpmyadmin 4: 4.0.10-1:

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 

Note. To run debconf-get-selections you need the debconf-utils package (on Ubuntu / Debian, possibly the same in other Debian base distributions), run apt-get install debconf-utils (there is no installation prompt for those who will do it with a script).

+6
source share
2 answers

To install phpmyadmin in a script (automatic installation) without installing / configuring any web server or with the phpmyadmin database configured using dbconfig-common, you need to configure the following parameters before installing the package

 phpmyadmin phpmyadmin/internal/skip-preseed boolean true phpmyadmin phpmyadmin/reconfigure-webserver multiselect phpmyadmin phpmyadmin/dbconfig-install boolean false 

Without phpmyadmin phpmyadmin/internal/skip-preseed boolean true it will start setting up the database using dbconfig-common (regardless of how phpmyadmin phpmyadmin/dbconfig-install installed). For me it was something that was missing, and I did not find on Google. The rest are obvious.

You can install them like this:

 debconf-set-selections <<< "phpmyadmin phpmyadmin/internal/skip-preseed boolean true" debconf-set-selections <<< "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" debconf-set-selections <<< "phpmyadmin phpmyadmin/dbconfig-install boolean false" 

Or if this does not work:

 echo "phpmyadmin phpmyadmin/internal/skip-preseed boolean true" | debconf-set-selections echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect" | debconf-set-selections echo "phpmyadmin phpmyadmin/dbconfig-install boolean false" | debconf-set-selections 

Then run apt-get -y install phpmyadmin .

+9
source

Running as root :

 APP_PASS="your-app-pwd" ROOT_PASS="your-admin-db-pwd" APP_DB_PASS="your-app-db-pwd" echo "phpmyadmin phpmyadmin/dbconfig-install boolean true" | debconf-set-selections echo "phpmyadmin phpmyadmin/app-password-confirm password $APP_PASS" | debconf-set-selections echo "phpmyadmin phpmyadmin/mysql/admin-pass password $ROOT_PASS" | debconf-set-selections echo "phpmyadmin phpmyadmin/mysql/app-pass password $APP_DB_PASS" | debconf-set-selections echo "phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2" | debconf-set-selections apt-get install -y phpmyadmin 

From: http://gercogandia.blogspot.com.ar/2012/11/automatic-unattended-install-of.html

+11
source

Source: https://habr.com/ru/post/988807/


All Articles