How to Install and Secure phpMyAdmin on Debian 11

 

 

phpMyAdmin is a widely used web-based application for managing MySQL and MariaDB databases. In this guide, we will walk you through the steps to install and secure phpMyAdmin on Debian 11.

Step 1: Update Your System

Start by ensuring your system is up to date:

sudo apt update && sudo apt upgrade -y

Step 2: Install phpMyAdmin

Install phpMyAdmin by running the following command:

sudo apt install phpmyadmin -y

Step 3: Configure Apache for phpMyAdmin

During the installation, you will be prompted to choose the web server that should be automatically configured to run phpMyAdmin. Select Apache2.

Next, you will need to configure Apache to serve phpMyAdmin:

sudo nano /etc/apache2/conf-available/phpmyadmin.conf

Add the following lines to the configuration file:

<Directory /usr/share/phpmyadmin>
        Options FollowSymLinks
        DirectoryIndex index.php

        <IfModule mod_authz_core.c>
            Require all granted
        </IfModule>

        <IfModule !mod_authz_core.c>
            Order Allow,Deny
            Allow from All
        </IfModule>
    </Directory>

Step 4: Secure phpMyAdmin with a Password

It is crucial to secure your phpMyAdmin installation. Create a password for the phpMyAdmin directory by running:

sudo htpasswd -c /etc/phpmyadmin/.htpasswd username

Replace username with your desired username and follow the prompts to set a password.

Step 5: Restart Apache

After making the changes, restart Apache to apply the configurations:

sudo systemctl restart apache2

Step 6: Access phpMyAdmin

You can access phpMyAdmin by navigating to http://your_domain_or_IP/phpmyadmin in your web browser. Enter the credentials you created earlier to log in.

Conclusion

You have successfully installed and secured phpMyAdmin on Debian 11. This tool will help you manage your databases efficiently through a web interface.

If you're looking for a reliable hosting solution for your phpMyAdmin and database applications, consider using Windows VPS UK. With Windows VPS, you can efficiently host your applications and ensure high performance. Whether you need VPS UK Windows or Windows Virtual Private Servers, you'll find a solution that fits your requirements.

For larger deployments or enterprise needs, explore Windows Virtual Dedicated Server Hosting or Virtual Private Server Hosting Windows. Whether you're located in the UK, Italy, or elsewhere, Windows VPS Italy and UK VPS Windows offer reliable hosting options. Visit Windows VPS Hosting UK to discover the best hosting solutions for your needs.

  • 0 A felhasználók hasznosnak találták ezt
Hasznosnak találta ezt a választ?

Kapcsolódó cikkek

Boost Your Ubuntu System's Performance with a Swap File: A Step-by-Step Guide

What is a Swap File? A swap file in Ubuntu serves as dedicated virtual memory on your hard...

How to Migrate ISPConfig 2, ISPConfig 3.x, Confixx, CPanel or Plesk to ISPConfig 3.2 (single server)

Introduction Migration from other control panels like ISPConfig 2, ISPConfig 3.x, Confixx,...

How to Install and Configure Zabbix Server and Client on Rocky Linux 9

Introduction Zabbix is an open-source monitoring solution that provides real-time...

How to Install CockroachDB Cluster on Debian 12

Introduction CockroachDB is a distributed SQL database built to handle large-scale,...

How to Install Joomla with Apache and Let's Encrypt SSL on AlmaLinux 9

Introduction Joomla is a popular open-source content management system (CMS) used to build...