How to Upgrade PhpMyAdmin in Linux distributions OS like Ubuntu, Redhat etc.. ?
There are 2 ways to install & maintain upgrade phpmyadmin in Linux operating systems.
First way :
Automated installations by using the personal archive repository for phpmyadmin
For adding repository list to Linux –
sudo add-apt-repository ppa:nijel/phpmyadmin
For first time installations
sudo apt-get install phpmyadmin
For updating the existing phpmyadmin second time onward where installation was done using the above command
sudo apt-get update phpmyadmin
Second way :
Manual installation by using the phpmyadmin download package
Make sure you have the sudo/root permissions for all software installations.
Example takes was to upgarde to 4.8.1 version phpmyadmin –
Goto your home directory
cd /home/{username}
Download phpmyadmin package
wget https://files.phpmyadmin.net/phpMyAdmin/4.8.1/phpMyAdmin-4.8.1-all-languages.tar.gz
extract the downloaded package to folder
tar -zxvf phpMyAdmin-4.8.1-all-languages.tar.gz
rename it to proper folder as used in the webserver configurations
mv phpMyAdmin-4.8.1-all-languages phpmyadmin
Goto user share directory where all shared software installations are managed
cd /usr/share
Move if any existing phpmyadmin folder to rename as old folder
sudo mv phpmyadmin phpmyadmin_old
Goto your home directory
cd /home/{username}
move the download& extracted phpmyadmin folder to user share directory
sudo mv phpmyadmin /usr/share/phpmyadmin
Goto user share directory
cd /usr/share
Provide the required permissions for www-data webserver user to read/write/execute
sudo chgrp -R www-data phpmyadmin
sudo chmod -R ug+rwx phpmyadmin
Your phpmyadmin has been upgraded to latest version.