jump to navigation

Installing PHP 5.3 and PhpMyadmin 3.3 on CentOS 5.5 March 12, 2011

Posted by Tournas Dimitrios in Uncategorized.

PHP 5.2 and PHP 5.3 has tons of functionalities which are not provided by PHP 5.1 (it has more OOP targeted features ) . PHP 5.1 is the most recent version of PHP available in CentOS 5.x and RHEL 5.1 via updates. Also, its difficult for people to upgrade OS(s) on production servers frequently and especially if the servers are running absolutely fine, it doesn’t really make sense to upgrade just for the heck of it. One more reason for no upgrades is the OS choices provided by many hosting companies. But a lot of CMS(s) and softwares are now recommending at least PHP 5.2 for an extended feature set.

First let’s install Php5.3 :

  • rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
  • Now you can install php by doing:
    yum –enablerepo=webtatic install php == OR ==

    Or update an existing installation of php, which will also update all of the other php modules installed:
    yum –enablerepo=webtatic update php

  • yum –enablerepo=webtatic install php-gd
  • yum –enablerepo=webtatic install php-domxml
  • If mysql is not yet installed on your box
    yum  install  mysql-server  mysql   php-mysql

Caution : the command line switch enablerepo has 2 dashes vs  – – enablerepo

By default mysq  is not secured , so let’s lock it with a password :

  • start mysql-server : sercice mysqld start
  • mysql_secure_installation  (It is going to ask you a handful of questions :

    1. You will be asked for your current mysql-root password . Because this is a new installation , it is set to none . Just press enter .
    2. You will be asked to set a password twice .
    3. You will be prompted to remove the Mysql anonymous users . For security reasons we want to do this . Press Y  and then enter
    4. You will be asked if you would like to disallow remote login for the root user and only allow connections from the server itself . To keep our server secure you want to say Y and press enter .
    5. Mysql ships with a default database called test . This is not needed and can be deleted . Press Y and then enter to delete the test database and it’s associated users .
    6. Press Y to reload the user setting (called privilege tables ) .

Installing PhmMyadmin 3.3.9 :

PhpMyadmin  comes in two releases :

  1. phpMyAdmin : Version compatible with PHP 5.2 +  and MySQL 5. Currently recommended version.
  2. phpMyAdmin : Version compatible with PHP 4+ and MySQL 3+ ( this version is compatible with Php 5.1 )
  • Go to the official web site of PhpMysql and download phpMyAdmin-3.3.3-english.tar.gz
  • Download the archive on your web-server’s root directory
  • now : tar  xvfz  phpMyAdmin-3.3.9-english.tar.gz (this will create a directory  phpMyAdmin-3.3.9-english)
  • Rename the directory phpMyAdmin-3.3.9-english :
    mv  phpMyAdmin-3.3.9-english   phpmyadmin
  • That’s it . Navigate with your browser : http://localhost/phpmyadmin
    Now you will be asked for your mysql-root password

Read the official wiki of PhpMyAdmin .



No comments yet — be the first.

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s