LINUX, FOSS AND LIBRARY TECHNOLOGY ENTHUSIAST

Thursday, November 28, 2024

Installing phpMyAdmin on Debian/Ubuntu with a Simple Script

0 comments
Managing databases just got easier! phpMyAdmin is a widely used web interface for MySQL and MariaDB, offering a user-friendly way to manage your databases. Instead of manually setting up the environment, why not automate the process? This simple bash script takes care of everything for you—from installing dependencies to configuring phpMyAdmin.

This script is designed to:

  • Automate the Setup: Quickly install and configure phpMyAdmin, MariaDB, Apache, and PHP.
  • Customize Easily: Modify user credentials, ports, and versions as needed.
  • Secure the Installation: Configures necessary firewall rules and phpMyAdmin settings.

Download the Script

Save time by downloading the script directly:


Make the Script Executable

sudo chmod +x install_phpmyadmin.sh

Run the Script

sudo ./install_phpmyadmin.sh

Features of the Script

  • Downloads and Installs phpMyAdmin: Fetches the latest version and sets it up in /opt.
  • Sets Up Apache: Configures a custom VirtualHost on a specified port for phpMyAdmin.
  • MariaDB Integration: Sets the root password and creates an admin user for database management.
  • Firewall Rules: Configures ufw to allow access to the specified phpMyAdmin port.
  • Secure Configuration: Updates blowfish_secret for enhanced security.

Accessing phpMyAdmin

After running the script:

Open your browser. Navigate to: http://localhost:8002 (Replace localhost with your server's IP).

Use these credentials:

Username: admin
Password: admin123

Customizing the Script

You can easily modify these variables within the script:

  • PHPMA_VERSION: The phpMyAdmin version (default is 5.2.1).
  • PHPMA_PORT: The port on which phpMyAdmin will run.
  • ADMIN_USER and ADMIN_PASS: Admin credentials for phpMyAdmin.
  • MYSQL_ROOT_PASS: Root password for MariaDB.

No comments:

Post a Comment