There is no phpmyadmin package in buster, and the version from stretch has issues with new PHP versions.

mkdir -p /var/www/phpmyadmin
wget https://files.phpmyadmin.net/phpMyAdmin/4.9.0.1/phpMyAdmin-4.9.0.1-english.tar.gz
cd /var/www/phpmyadmin
tar -xzf ~/phpMyAdmin-4.9.0.1-english.tar.gz
ln -sf phpMyAdmin-4.9.0.1-english phpmyadmin
cd -
rm phpMyAdmin-4.9.0.1-english.tar.gz

echo 'Alias /phpmyadmin /var/www/phpmyadmin/phpmyadmin' > /etc/apache2/sites-enabled/phpmyadmin.conf
echo '<Directory /var/www/phpmyadmin/>' >> /etc/apache2/sites-enabled/phpmyadmin.conf
echo '  Options SymLinksIfOwnerMatch' >> /etc/apache2/sites-enabled/phpmyadmin.conf
echo '  DirectoryIndex index.php' >> /etc/apache2/sites-enabled/phpmyadmin.conf
echo >> /etc/apache2/sites-enabled/phpmyadmin.conf
echo '  RewriteEngine On' >> /etc/apache2/sites-enabled/phpmyadmin.conf
echo '  RewriteCond %{HTTPS} off' >> /etc/apache2/sites-enabled/phpmyadmin.conf
echo '  RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]' >> /etc/apache2/sites-enabled/phpmyadmin.conf
echo '</Directory>' >> /etc/apache2/sites-enabled/phpmyadmin.conf

echo '<?php' > /var/www/phpmyadmin/config.inc.php
echo '$cfg['"'blowfish_secret'] = '"`date +%s%N | sha256sum | base64 | head -c 32`"';" >> /var/www/phpmyadmin/config.inc.php
echo >> /var/www/phpmyadmin/config.inc.php
echo '$i = 0;' >> /var/www/phpmyadmin/config.inc.php
echo >> /var/www/phpmyadmin/config.inc.php
echo '$i++;' >> /var/www/phpmyadmin/config.inc.php
echo '$cfg['"'Servers'"'][$i]['"'auth_type'] = 'cookie';" >> /var/www/phpmyadmin/config.inc.php
echo '$cfg['"'Servers'"'][$i]['"'host'] = 'localhost';" >> /var/www/phpmyadmin/config.inc.php
echo '$cfg['"'Servers'"'][$i]['"'compress'] = false;" >> /var/www/phpmyadmin/config.inc.php
echo '$cfg['"'Servers'"'][$i]['"'AllowNoPassword'] = false;" >> /var/www/phpmyadmin/config.inc.php
echo >> /var/www/phpmyadmin/config.inc.php
echo '$cfg['"'MaxRows'] = 500;" >> /var/www/phpmyadmin/config.inc.php
echo '$cfg['"'SendErrorReports'] = 'never';" >> /var/www/phpmyadmin/config.inc.php
echo '$cfg['"'TempDir'] = '/var/www/phpmyadmin/tmp/';" >> /var/www/phpmyadmin/config.inc.php
ln -s /var/www/phpmyadmin/config.inc.php /var/www/phpmyadmin/phpmyadmin/

mkdir -p /var/www/phpmyadmin/tmp
chgrp www-data /var/www/phpmyadmin/tmp
chmod 0775 /var/www/phpmyadmin/tmp
computer/manual_install_phpmyadmin.txt · Last modified: 2019/08/06 12:30 by tdobes
Recent changes RSS feed Driven by DokuWiki Valid XHTML 1.0 Valid CSS