Install phpMyAdmin in CentOS Server

Download latest version of phpMyAdmin from

http://www.phpmyadmin.net/home_page/downloads.php

cd /usr/local/src
wget https://files.phpmyadmin.net/phpMyAdmin/4.6.5.2/phpMyAdmin-4.6.5.2-english.tar.gz
tar zxvf phpMyAdmin-4.6.5.2-english.tar.gz
mkdir /usr/hostonnet
ls -l /usr/hostonnet/phpmyadmin
mv phpMyAdmin-4.6.5.2-english /usr/hostonnet/phpmyadmin
cp /usr/hostonnet/phpmyadmin/config.sample.inc.php /usr/hostonnet/phpmyadmin/config.inc.php

You need to edit /usr/hostonnet/phpmyadmin/config.inc.php and set a random string for $cfg[‘blowfish_secret’]

vi /usr/hostonnet/phpmyadmin/config.inc.php

Now create apache configuration file

vi /etc/httpd/conf.d/phpmyadmin.conf

Add following to the file

Alias /phpmyadmin "/usr/hostonnet/phpmyadmin"

<Directory "/usr/hostonnet/phpmyadmin">
    AllowOverride All
    Options FollowSymlinks
    Order allow,deny
    Allow from all
</Directory>

Restart Apache web server

service httpd restart

Now you will be able to access phpMyAdmin by going to URL

http://your-server-ip/phpmyadmin

Posted in Linux