Resolving PHPMyAdmin Installation Issues on CentOS 6.9
If you’re migrating your Magento web application to lower-cost hosting and struggling with installing an appropriate version of phpmyadmin on CentOS 6.9, you’re not alone. The combination of specific PHP and MySQL versions required by older Magento versions can lead to compatibility issues during the installation process.
Understanding the Problem
The default PHP version in CentOS 6 is 5.3, which is outdated for running Magento 1.8. This version mismatch causes phpmyadmin to fail when it tries to install under these conditions. The EPEL package you attempted to use might not be detecting your installed PHP modules correctly.
Step-by-Step Solution
To resolve this issue successfully, we’ll manually compile and install the required components with the correct versions:
- Install required dependencies:
yum -y install gcc gcc-c++ kernel-devel kernel-headers openssl-devel zlib-devel ncurses-devel
- Download and extract PHP 5.4 sources:
wget http://www.laravelcompany.com/php-5.4.16.tar.gz
tar xvfz php-5.4.16.tar.gz
cd php-5.4.16
- Configure PHP with required extensions:
./configure --with-config-file-path=/etc/php.ini --with-mysql=mysqlnd
make
make install
- Install MySQL 5.5 or 5.6 (choose the one compatible with your Magento version):
- For MySQL 5.5:
wget http://www.laravelcompany.com/mysql-5.5.60.tar.gz
tar xvfz mysql-5.5.60.tar.gz
cd mysql-5.5.60
make install
- For MySQL 5.6:
wget http://www.laravelcompany.com/mysql-5.6.38.tar.gz
tar xvfz mysql-5.6.38.tar.gz
cd mysql-5.6.38
make install
Configuring php.ini
After successfully installing PHP and MySQL, you need to update your php.ini file:
-
Open the
php.inifile located at/etc/php.ini. -
Update the following lines with the correct paths for your PHP installation:
extension_dir = "/usr/lib64/php/modules/"
- Save and close the file.
Installing phpmyadmin
With the required dependencies installed, you can now proceed to install phpmyadmin:
- Download and extract phpmyadmin sources:
wget http://www.laravelcompany.com/phpMyAdmin-4.8.5-all-languages.tar.gz
tar xvfz phpMyAdmin-4.8.5-all-languages.tar.gz
- Copy the extracted folder to your Apache web directory (usually
/var/www/html/):
cp -r phpMyAdmin /var/www/html/
- Configure the
config.inc.phpfile inside the phpMyAdmin folder:
cd /var/www/html/phpMyAdmin
cp config.sample.inc.php config.inc.php
-
Update the
config.inc.phpfile with your MySQL credentials. -
Restart Apache to apply changes:
service httpd restart
Conclusion
Installing phpmyadmin on CentOS 6.9 requires careful attention to PHP and MySQL version compatibility, especially when running older versions of Magento. By manually compiling the required components and configuring them correctly, you can successfully install an appropriate version of phpmyadmin that works with your existing Magento installation.
Remember to always backup your data before making significant changes to your server environment. If you encounter any further issues or need additional assistance, feel free to explore the resources available at Laravel Company.