In this howto i will describe how to update PHP rpms on servers to latest version. If you have server running CentOS/Fedora/RHEL, you will noticed that it will use regular rpms of distro to install PHP and to update you have to restrict yourself with distro update of said rpms of PHP, which can be not a major update.
Like in CentOS 5.3 you cannot update PHP version above 5.1.x. I have been using different repositories to update PHP to latest version but most of them break rpm one or two, which may let to unstable Server.
AtomicRocketTurtle (http://www.atomicrocketturtle.com/) company i found that regularly updating applications used in CentOS/Fedora/RHEL. You will be seeing that i will be updating PHP from version 5.1.x to 5.2.12, which is latest till this date.
1) Install AtomicRocketTurtle Repository.
Pre-requisite of atomicrocketturtle repository is yum, you should be confirm that you have yum install specially on CentOS. Some of the VPS comes without yum installation, so if your server doesnt have yum on CentOS 5.x, use following my post to install yum. https://www.sohailriaz.com/howto-install-yum-on-centos-52-vps/
To install atomicrocketturtle repository run following command.
wget -q -O – http://www.atomicorp.com/installers/atomic.sh | sh
This script will automatically detect your OS and install approperiate repository.
2) Update PHP
First check the available PHP version on atomic repository
yum list | grep atomic | grep php
Get the list of your install rpm and update following.
rpm -qa | grep php
php-cli-5.1.6-23.2.el5_3
php-5.1.6-23.2.el5_3
php-gd-5.1.6-23.2.el5_3
php-pdo-5.1.6-23.2.el5_3
php-common-5.1.6-23.2.el5_3
php-imap-5.1.6-23.2.el5_3
php-xml-5.1.6-23.2.el5_3
php-mbstring-5.1.6-23.2.el5_3
php-mysql-5.1.6-23.2.el5_3
It can be different for you, just create the list like below i used for update PHP. I used every package name as i dont want to miss any of the module it has.
yum update php php-cli php-gd php-pdo php-common php-imap php-xml php-mbstring php-mysql
at end you will see this
Updated: php.i386 0:5.2.12-3.el5.art php-cli.i386 0:5.2.12-3.el5.art php-common.i386 0:5.2.12-3.el5.art php-gd.i386 0:5.2.12-3.el5.art php-imap.i386 0:5.2.12-3.el5.art php-mbstring.i386 0:5.2.12-3.el5.art php-mysql.i386 0:5.2.12-3.el5.art php-pdo.i386 0:5.2.12-3.el5.art php-xml.i386 0:5.2.12-3.el5.art
Complete!
If you have any question please use comments.
this works.. thanks
Whereabouts are you from? lola pictures lolita nude qdhqp
when i run yum update …….
after testing it shows me some conflicts.
Transaction Check Error:
file /etc/my.cnf from install of mysql-libs-5.5.19-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.5.19-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.5.19-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
file /usr/share/mysql/charsets/cp1251.xml from install of mysql-libs-5.5.19-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
suggest me how to remove these conflicts,
@Yaqoob: Did you manage to fix it. If not then detail of the issue is that its comes within the repository because sometime they added some packages which are dependent on some latest or old version which havent update in repository.
to fix this you have to manually install or remove rpm.
In your case it try to install mysql from other source which is out of CentOS Repository. You gotta do this manually by not let it update mysql.
———
Regards,
I need to update my php from 5.1.6 to 5.2. I don’t need the absolute latest version.
Is there a chance you can talk me through it. I have no server experience really…but I have putty..and a basic knowledge.
Thanks
B
@Bebop: Using above procedure will not let you install specific PHP version unless it is available same on repository. All you can do is to find and download all rpms for 5.2.x and install them at one command. You can find you list of already install rpm using following command.
rpm -qa | grep php
get the names of all install php rpm and search it on internet. I am sure somebody has full list available for 5.2. Download them on one location and install with one rpm install command.
——–
Regards,
Thank you for your help and for responding so quickly.
Nice!
It`s so useful!
Where did you go to university? buy zoloft online
39. Pursue life-long learning and professional development through self-analysis
Really Nice Work
in my fedora i use
“yum update php”
and its work perfect…