Posted by: kezhong | April 18, 2011

Install phpMyAdmin on CentOS 5.6

In my system, I have installed httpd. So I just record the other steps.

Update the packages
# yum update -y

Install MySQL packages
# yum install mysql-server mysql mysql-devel

Make MySQL boot up automatically
# chkconfig mysqld on

Start MySQL service
# service mysqld start

Set the password for the root user
# mysqladmin -u root password kezhong

Install php and common packages
# yum install php php-gd php-imap php-mysql php-pear php-xml phpxmlrpc curl libxml2 php-mbstring php-mcrypt

Install phpMyAdmin
Because the version of php on CentOS 5.6 is 5.1.6, we only can install phpMyAdmin 2.x, I choose 2.11.11.3.
# cd /usr/share
# wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/2.11.11.3/phpMyAdmin-2.11.11.3-english.tar.gz/download
# tar xvfz phpMyAdmin-2.11.11.3-english.tar.gz
# mv phpMyAdmin-2.11.11.3-english phpmyadmin
# rm phpMyAdmin-2.11.11.3-english.tar.gz
# cd phpmyadmin
# cp config.sample.inc.php config.inc.php

Edit the config.inc.php file, find the line that contain “blowfish_secret”, and modify like below.
$cfg['blowfish_secret'] = ‘TypeAnything_for_Secure’;

Append a line into the /etc/httpd/conf.d/phpmyadmin.conf file
# echo “Alias /phpMyAdmin /usr/share/phpmyadmin” >> /etc/httpd/conf.d/phpmyadmin.conf

Restart the httpd service
# service httpd restart

Enter the URL http://%5BIP Address]/phpMyAdmin/ on Firefox browser, we’ll can see the login web page.

After inputting the root user and its password(kezhong), we can use phpMyAdmin to manage the MySQL.

About these ads

Responses

  1. Hey, thanks for the post.

    At the final part of this setup, when adding the Alias, shouldn’t it be in
    /etc/httpd/conf.d/php.conf

    instead of:

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

    • thank you very much

  2. Thanks Man. Very nice article. Basic İnstall :)

  3. CentOS allows PHP 5.3 through ‘php53′ packages, so you can install php5.3 over 5.1 and then download and install phpMyAdmin 3+

    Thanks for your help! I’m new to CentOS (usually an Ubuntu server admin)

  4. Uh – what about the “cookies must be enabled” error that appears in the example – it stops you from creating databases or tables.

  5. Thanks for the post.
    As I was following, I get the error after I added the following line to php.conf
    # echo “Alias /phpMyAdmin /usr/share/phpmyadmin” >> /etc/httpd/conf.d/php.conf
    When restarting service, it gives me ‘Syntax error on line 32 of /etc/httpd/conf.d/php.conf: Invalid command ‘echo’, perhaps misspelled or defied by a module not included in the server configuration.

    Can I get your help on this?
    Thanks!!

    • I’m sorry, I shouldn’t have put that line inside php.conf file.
      That line should have been typed from command line.

  6. i did’t c phpMyAdmin.conf file?

  7. Stumbled again to this blog, thanks a bunch for the useful guides …

  8. Hello i take this error but i dont know why this…

    Starting httpd: Syntax error on line 1 of /etc/httpd/conf.d/phpmyadmin.conf:
    Alias takes two arguments, a fakename and a realname
    [FAILED]

    in phpmyadmin.conf i see the line
    Alias /phpMyAdmin/usr/share/phpmyadmin

  9. “Enter the URL http://%5BIP Address]/phpMyAdmin/ on Firefox browser, we’ll can see the login web page.”

    Firefox is really necessary!

  10. thank you very much for that guide. It helps me a lot on my project.

  11. Starting httpd: Syntax error on line 1 of /etc/httpd/conf.d/phpmyadmin.conf:
    Invalid command ‘.Alias’, perhaps misspelled or defined by a module not included in the server configuration

    Any ideas?

    • remove leading and trailing “

  12. get this errro The requested URL /phpMyAdmin/ was not found on this server.

  13. Спасибо! Пропарился 3 часа. Эта статья помогла справится с проблемой.

  14. I think you are trying by copy pest. Its wrong procedure.
    You must type in command line below command….and press enter.

    # echo “Alias /phpMyAdmin /usr/share/phpmyadmin” >> /etc/httpd/conf.d/phpmyadmin.conf

    now see in /etc/httpd/conf.d/ folder, a new file created automatically named phpmyadmin.conf restart httpd and enjoy……

  15. Hi, on my build of centos 5.6 I followed along and everything was good until i got to the bit about the phpmyadmin.conf

    instead i edited php.conf

    also in php.conf I added

    Alias /randomname /usr/share/phpmyadmin

    and that worked. Anything else failed. Just change randomname to whatever you want phpmyadmin to be called by in your browser after the IP address.

    also, for some reason the “service” calls didnt work for me and i had to use /etc/init.d/httpd restart

    or the actual paths to it. Hope this helps anyone that couldnt follow along

  16. *Notice If you copy and paste you’ll end up with the . rather then ” make sure you fix this.

  17. how about to install the latest phpmyadmin?

  18. […] Read More: http://kezhong.wordpress.com/2011/04/18/install-phpmyadmin-on-centos-5-6/ […]

  19. Stumbled again to this blog, thanks a bunch for the useful guides …

  20. The mbstring extension is missing. Please check your PHP configuration.

  21. I found a very easy free tool to use with mysql – Valentina Studio http://www.valentina-db.com/en/valentina-studio-overview


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.

Join 42 other followers

%d bloggers like this: