-
-
Save teotikalki/036a4f7dd2e50906dd20ccac7dd67439 to your computer and use it in GitHub Desktop.
Install phpMyAdmin on ISPConfig
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
#!/bin/bash | |
## Install phpMyAdmin on ISPConfig | |
## Debian 8.7 or Ubuntu 16.04 | |
## phpMyAdmin 4.6.6 | |
cd /tmp/ | |
wget https://files.phpmyadmin.net/phpMyAdmin/4.6.6/phpMyAdmin-4.6.6-all-languages.tar.gz | |
tar -xf phpMyAdmin-4.6.6-all-languages.tar.gz && mv phpMyAdmin-4.6.6-all-languages myadmin | |
echo '<?php | |
$cfg['blowfish_secret'] = "BLOWFISHSECRET"; | |
$i = 0; | |
$i++; | |
$cfg["Servers"][$i]["auth_type"] = "cookie"; | |
$cfg["Servers"][$i]["host"] = "localhost"; | |
$cfg["Servers"][$i]["connect_type"] = "tcp"; | |
$cfg["Servers"][$i]["compress"] = false; | |
$cfg["Servers"][$i]["AllowNoPassword"] = false; | |
$cfg["Servers"][$i]["extension"] = "mysqli"; | |
$cfg["UploadDir"] = ""; | |
$cfg["SaveDir"] = ""; | |
if ($_SERVER["SERVER_PORT"] == 80){$cfg["Servers"][$i]["AllowRoot"] = FALSE; | |
$cfg["Servers"][$i]["hide_db"] = "(information_schema|phpmyadmin|mysql|test)"; | |
} | |
$cfg["Lang"] = "en";' > myadmin/config.inc.php | |
blowfish_secret=$(openssl rand -base64 32) | |
sed -i "s|BLOWFISHSECRET|$blowfish_secret|" myadmin/config.inc.php | |
chown -R ispconfig:ispconfig myadmin | |
mv myadmin /usr/local/ispconfig/interface/web/ | |
cd /tmp/ | |
wget https://raw.githubusercontent.com/jniltinho/ispconfig/master/files/server/conf-custom/apache_ispconfig.conf.master | |
mv apache_ispconfig.conf.master /usr/local/ispconfig/server/conf-custom/ | |
mkdir -p /var/www/htdocs | |
cd /var/www/htdocs/ | |
wget https://raw.githubusercontent.com/jniltinho/ispconfig/master/files/htdocs/index.html | |
wget https://raw.githubusercontent.com/jniltinho/ispconfig/master/files/htdocs/under_construction.png | |
wget https://raw.githubusercontent.com/jniltinho/ispconfig/master/files/htdocs/under_construction1.png | |
wget https://raw.githubusercontent.com/jniltinho/ispconfig/master/files/htdocs/under_construction2.png | |
wget https://raw.githubusercontent.com/jniltinho/ispconfig/master/files/htdocs/favicon.ico | |
chown -R www-data:www-data /var/www/htdocs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment