Can't stop making
Home

Installing latest PHP and MySQL on CentOS 5.x/6.x

First off you should make sure you have an up to date system. So do a:

yum update

Then we'll add in the remi repo. You can either follow the instructions here: http://blog.famillecollet.com/pages/Config-en or listen to what I say and type (for CentOS 5.x):

wget http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

(for CentOS 6.x):

wget http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

Next you should do another yum update, you'll most likely update some packages from the just installed EPEL repo.

Then you do:

yum --enablerepo=remi update

It would list all php and mysql packages from the remi repo.

[NOTE for CentOS 5.x] If you encounter an error when trying to install packages from the remi repo along the lines of xxxx.mysql.xxxxxxx.x86_64.remi.xxxx  in conflict with xxxx.mysql.xxxx.i386.epl.xxxx

This is because of some strange reason mysql installation installed both x86_64 and i386 packages onto your installation. You can verify this by doing a:

yum list installed mysql

The fix is to remove the i386 package, so we'll do a:

yum remove mysql.i386 mysql-devel.i386

Then redo the yum update with remi repo enabled and you should get a successful installation.

While you're at it you might as well install the following too if you use them:

yum --enablerepo=remi install php-mcrypt make gcc GeoIP-devel.x86_64 GeoIP-data geoip
pecl install timezonedb xdebug geoip

標籤 tag(s)

  • PHP
  • MySQL
  • CentOS

Version

CentOS 5.x and 6.x

Last Updated

24th September, 2011

First Published

24th September, 2011

Comments

Leave a comment

Any published comments will adhere to the etiquette policy and all e-mail addresses will be treated in accordance to the privacy policy.

  • If you see this, something's wrong with Twitter.

Blatant Plug

Need a new CPU or graphics card? Get AMD.

AMD Vision and AMD Radeon Graphics

Support

I've pledged my support to these organisations, and I think you should too.

  • Google+
  • Follow ronaldslc on Twitter
  • View Ronald Chan's profile on LinkedIn