Keep your phpMyAdmin installation up-to-date automatically (How To Update phpMyAdmin)

Discussion in 'Tips/Tricks/Mods' started by Th0m, Feb 23, 2022.

Thread Status:
Not open for further replies.
  1. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    In the Perfect Server tutorials, phpMyAdmin is installed from source, because the phpMyAdmin package in the repositories is often out of date. Many users install it once and never look at the version again, which makes it a security risk.
    I want to keep my servers secure, but I have no interest in updating phpMyAdmin manually every time on each system. That's why I wrote a simple script to run the update, which you can use as well.

    Before continuing, make sure curl is installed:
    Code:
    apt install curl -y

    If you want to run the script manually when you see a new version is available, run
    Code:
    curl https://git.ispconfig.org/ispconfig/tools/-/raw/master/auto_update_phpmyadmin.sh -sL | sh

    If you want to set up a cronjob to check for updates and install them when available:
    Download the script:
    Code:
    curl https://git.ispconfig.org/ispconfig/tools/-/raw/master/auto_update_phpmyadmin.sh -L -o /etc/cron.daily/auto_update_phpmyadmin
    Make it executable:
    Code:
    chmod +x /etc/cron.daily/auto_update_phpmyadmin
    You can eventually set the email variable in /etc/cron.daily/auto_update_phpmyadmin to your e-mail address to receive notifications when a update has been done.

    Your phpMyAdmin installation will now be updated automatically.
     
    Last edited: May 28, 2022
    picaron, pzajda, DodgeThis and 8 others like this.
Thread Status:
Not open for further replies.

Share This Page