Table of Contents
This tip is about the how to Run phpMyAdmin Bullseye (Apache) on Debian 11. So read this free guide, How to Run phpMyAdmin Bullseye (Apache) on Debian 11 step by step. If you have query related to same article you may contact us.
How to Run phpMyAdmin Bullseye (Apache) on Debian 11 – Guide
In that tutorial, we’ll tell you the best way to install phpMyAdmin on Debian 11. For those of you who didn’t have a clue, phpMyAdmin is a free, open source, web-based application used to oversee MySQL or MariaDB datasets on web interface. It is written in PHP and is one of the most popular database organization devices used by web facilitation companies to allow novice system executives to do dataset exercises.
This article accepts that you have basically essential information about Linux, note how to use the shell and, above all, you will have your website on your own VPS. Installation is very basic and expects you to be running under the root account in case you have to add ‘sudo’ to requests to get root advantages. I’m going to show you how to gradually install phpMyAdmin on a Debian 11 (Bullseye).
Install PHPMyAdmin on Debian 11
By default it is included in the official Debian 11 repositories. Therefore, installation is very easy to do. The problem is that the versions included in the repositories are not always the most up-To date.
So, in this post, we’ll go through the whole process to get the latest stable version published on the PHPMyAdmin website.
Install LAMP on Debian 11
As it is a web application, it is necessary for our computer to function as a web server. So we need to install LAMP on Debian 11
For that, you should install Apache first on Debian 11 and then MariaDB on Debian 11. With our posts, you will have no problem doing this.
Also, it is necessary to install some PHP modules, like
php libapache2-mod-php php-mysql php-mysql php-mbstring php-xml php-zip
Once we have LAMP fully installed, we can continue.
Downloading and installing the latest version of PHPMyAdmin
As of this writing, the latest stable version of PHPMyAdmin is 5.1.1. In the future, this will change. So, to keep it working, in the commands replace 5.1.1 with the updated version number.
Now, from the /tmp/ folder, download PHPMyAdmin with the wget command.
cd / tmp / wget https://files.phpmyadmin.net/phpMyAdmin/5.1.1/phpMyAdmin-5.1.1-all-languages.tar.gz
Then unzip it and move it to another location. In that case, I’ll move it to /usr/share/phpmyadmin.
sudo mv phpMyAdmin-5.1.1-all-languages / usr / share / phpmyadmin
Now create a tmp folder dedicated to PHPMyAdmin. So make Apache your owner.
sudo mkdir -p / var / lib / phpmyadmin / tmpsudo chown -R www-data: www-data / var / lib / phpmyadmin
Also, create a dedicated configuration folder:
sudo mkdir / etc / phpmyadmin /
Enable the PHPMyAdmin configuration by copying the sample with the configuration name that the program will recognize.
sudo cp /usr/share/phpmyadmin/config.sample.inc.php
/usr/share/phpmyadmin/config.inc.php
This file needs to be edited to make two modifications.
sudo nano /usr/share/phpmyadmin/config.inc.php
The first is to set a password that will help us increase security.
$cfg[‘blowfish_secret’] = ‘[passphrase]’;
The second is to define the path to the temporary folder we created for PHPMyAdmin. You can add this line.
$cfg[‘TempDir’] = ‘/var/lib/phpmyadmin/tmp’;
Save your changes and close the editor. Now you need to add a recommended Apache configuration for optimal access to PHPMyAdmin. So create the file
sudo nano /etc/apache2/conf-enabled/phpmyadmin.conf
And add the following:
Alias / phpmyadmin / usr / share / phpmyadminServerName your-domain
Options SymLinksIfOwnerMatchDirectoryIndex index.php
AddType application / x-httpd-php .php SetHandler application / x-httpd-php php_value include_path .php_admin_value upload_tmp_dir / var / lib / phpmyadmin / tmpphp_admin_value open_basedir / usr / share / phpmyadmin /: / etc / phpmyadmin /: / var / lib / phpmyadmin / gettext: / usr / usr / php / gettext: / share / php / php-php-gettext /: / usr / share / javascript /: / usr / share / php / tcpdf /: / usr / share / doc / phpmyadmin /: / usr / share / php / phpseclib / php_admin_value mbstring.func_overload 0
AddType Application / x-httpd-php .php SetHandler / x-httpd-php application php_value include_path .php_admin_value upload_tmp_dir / var / lib / phpmyadmin / tmpphp_admin_value open_basedir / usr / share / phpmyadmin /: / etc / phpmyadmin /: / var / lib / phpmyadmin / gettext: / usr / usr / php / gettext: / share / php / php-php-gettext /: / usr / share / javascript /: / usr / share / php / tcpdf /: / usr / share / doc / phpmyadmin /: / usr / share / php / phpseclib / php_admin_value mbstring.func_overload 0
AuthType BasicAuthName “phpMyAdmin Setup” AuthUserFile /etc/phpmyadmin/htpasswd.setup Require valid user
Save your changes and close the editor.
Now enable the rewrite module and check the service status for an error.
sudo a2enmod rewritesudo systemctl restart apache2sudo systemctl status apache2
Optionally, but recommended, you can secure access to PHPMyAdmin by installing Let’s Encrypt certificates. So install Certbot and Apache plugin.
sudo apt install certbot python3-certbot-apache
And manage the certificates as follows
sudo certbot -apache -d [your-domain]
Then follow the tool’s interactive instructions. There you will have to set your email address and the installation will be done. Then restart Apache.
sudo systemctl restart apache2
Now you can login using your favorite browser at https: // your-server / phpmyadmin / and you will see the login screen.
Final note
I hope you like the guide How to Run phpMyAdmin Bullseye (Apache) on Debian 11. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.