Web Hosting Forum | Lunarpages

Author Topic: Upgrading Apache and PHP using Yum on a non-cPanel server  (Read 14070 times)

Danielle

  • Guest
Upgrading Apache and PHP using Yum on a non-cPanel server
« on: September 12, 2006, 09:26:19 AM »
Hi,

To upgrade PHP 4 (not PHP5) on a non-cPanel server such as one with Webmin, you can do the following:

1. First, backup grub.conf:

Code: [Select]
cp /etc/grub.conf /etc/grub.conf.back
2. Run yum upgrade:

Code: [Select]
yum update
3. Let yum process, and once it is done, check grub to show the new and old kernel:

Code: [Select]
vi /etc/grub.conf
It should show the new kernel and the old kernel in that file.  Compare the one you backed up (/etc/grub.conf.back) to check that the old kernel is truly listed in the new file.  If it isn't, you must copy the last kernel info over from /etc/grub.conf.back file and add it below the new kernel.

Also, check the top line has the following:

Code: [Select]
default=0
If instead it has:

Code: [Select]
default=1
Change this 1 to a 0 before you leave the file.

Check the kernel now shows the new version:

Code: [Select]
uname -r
Now that you've made sure the new kernel is upgraded and the server will still boot to the old if the new doesn't work, you can do the reboot to get the new kernel working on the system:

Code: [Select]
reboot
At this point, your server will go down for around 5-15 minutes.  If the server is not back after waiting 20 minutes, you should go into http://dedicated@lunarpages.com/ to let an admin know so we can check for you or send a ticket to dedicated@lunarpages.com

It is best to choose to do this upgrade during times when we have the most admins available to assist you such as from 6am - 8pm Pacific time in the U.S. from Monday to Friday.  Picking other times might delay getting assistance if the server does not come back from reboot.

Please post here if you have any questions or concerns.

Thanks.
« Last Edit: June 22, 2007, 08:36:48 AM by Mitch »

garg

  • Guest
Re: Upgrading Apache and PHP using Yum on a non-cPanel server
« Reply #1 on: September 12, 2006, 11:25:52 PM »
Seems to me that this procedure will just apply patch to any component of your system but not upgrade PHP.

Danielle

  • Guest
Re: Upgrading Apache and PHP using Yum on a non-cPanel server
« Reply #2 on: September 13, 2006, 02:39:09 AM »
Hi garg,

If you are not cPanel, yum update should upgrade PHP and all other components.  If you are on a cPanel server, you would not use this method to upgrade PHP.  It also upgrades Apache, the kernel and so on.  It's for Webmin servers, though.

Have a Blessed Day

Offline Nibbler

  • 21st century digital boy
  • Master Jedi
  • *****
  • Posts: 1168
    • Coppermine
Re: Upgrading Apache and PHP using Yum on a non-cPanel server
« Reply #3 on: September 13, 2006, 06:44:24 AM »
If you only want to update php and apache then you can specify that when you run yum.

Code: [Select]
yum update php httpd
Missing since 1983


Offline ThainS

  • The Four-Pointed Star
  • Trekkie
  • **
  • Posts: 13
Re: Upgrading Apache and PHP using Yum on a non-cPanel server
« Reply #4 on: September 13, 2006, 07:51:53 AM »
Very true, you can specify just httpd and php to be upgraded with yum, however there is also a kernel upgrade that has been released, so you might want to update that too.

Code: [Select]
yum update httpd php kernel*
Really if possible, its a good idea to do a system wide update just to make sure everything is the most current secure version. It avoids potential issues in the future.
« Last Edit: September 13, 2006, 07:53:36 AM by ThainS »

Offline aldoy

  • Trekkie
  • **
  • Posts: 13
Re: Upgrading Apache and PHP using Yum on a non-cPanel server
« Reply #5 on: December 28, 2006, 10:59:38 AM »
I did preform the upgrade, but it went up to PHP 4.3.9, how do I make it 4.4.4?

Offline perestrelka

  • Master Jedi
  • *****
  • Posts: 1397
Re: Upgrading Apache and PHP using Yum on a non-cPanel server
« Reply #6 on: December 28, 2006, 10:19:19 PM »
Hello aldoy,

"yum update" is supposed for security updates rather than for version upgrades. I'm not sure whether it is possible to install PHP 4.4.4 using it, but you can install PHP 5 from the CentOS Plus Repository. Uncomment the repository entries in the /etc/yum.conf and run "yum update php" then to accomplish that.

I hope this helps.
Kind Regards,
Vlad Artamonov

Offline aldoy

  • Trekkie
  • **
  • Posts: 13
Re: Upgrading Apache and PHP using Yum on a non-cPanel server
« Reply #7 on: January 07, 2007, 07:32:30 AM »
But the notification email from LP mentioned that PHP should be upgraded to 4.4.4, so is it recomemended to go for PHP5 anyways?

Offline perestrelka

  • Master Jedi
  • *****
  • Posts: 1397
Re: Upgrading Apache and PHP using Yum on a non-cPanel server
« Reply #8 on: January 09, 2007, 10:40:49 PM »
Hi,

The upgrade to 4.4.4 is recommended for cPanel servers. If you are happy with version 4.3.9 and run "yum update" to install the latest security patches for PHP, there is no need to move to PHP 5.

I hope this is helpful.
Kind Regards,
Vlad Artamonov

 

Share |