Last active
November 26, 2021 11:47
-
-
Save zolem/79ba01fd3deb130b851d to your computer and use it in GitHub Desktop.
Install phpmyadmin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Installing pwgen..." | |
sudo apt-get install pwgen -y | |
AUTO_GENERATED_PASS=`pwgen -c -1 20` | |
echo "Installing phpmyadmin..." | |
sudo debconf-set-selections <<< "phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2" | |
sudo debconf-set-selections <<< "phpmyadmin phpmyadmin/dbconfig-install boolean true" | |
sudo debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/admin-user string root" | |
sudo debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/admin-pass password root" | |
sudo debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/app-pass password $AUTO_GENERATED_PASS" | |
sudo debconf-set-selections <<< "phpmyadmin phpmyadmin/app-password-confirm password $AUTO_GENERATED_PASS" | |
sudo apt-get install phpmyadmin -y | |
sudo php5enmod mcrypt | |
sudo service apache2 reload | |
echo "phpmyadmin installed!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment