Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
March 18, 2010, 04:36:26 AM

Pages: [1] 2 3   Go Down
  Print  
Author Topic: How to upgrade php4 to php5 on VPS plan?  (Read 5744 times)
volence
Trekkie
**
Offline Offline

Posts: 13


« on: August 10, 2008, 02:40:16 AM »

I bought VPS plan and found that the PHP installed on the server is PHP4, but I need PHP5, can I upgrade to PHP5 and how to?
I tried to use yum but it seems can't work.

Thank you !
Logged
volence
Trekkie
**
Offline Offline

Posts: 13


« Reply #1 on: August 10, 2008, 07:23:25 AM »

OK, I've managed to finish it by rpm... Sorry for disturb.

I also have another question, how to know how many bandwitdh I have used this month?
Logged
perestrelka
Administrator
Master Jedi
*****
Online Online

Posts: 1311



« Reply #2 on: August 13, 2008, 10:24:32 PM »

OK, I've managed to finish it by rpm... Sorry for disturb.

I also have another question, how to know how many bandwitdh I have used this month?


If you have Plesk on your VPS, it shows bandwith stats for each domain created in it.
Logged

Kind Regards,
Vlad Artamonov
berryc
Space Explorer
***
Offline Offline

Posts: 8


« Reply #3 on: August 20, 2008, 01:20:58 PM »

Hi Volence,
I need to do the same...can you share how you did it?

Thanks,
Craig
Logged
perestrelka
Administrator
Master Jedi
*****
Online Online

Posts: 1311



« Reply #4 on: August 21, 2008, 09:01:54 PM »

Hi Craig,

I would use the following steps to get PHP upgrade to version 5:

1. Login to the server as root via ssh
2. Install yum using the following commands:

rpm -ihv --nodeps http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm
rpm -ihv --nodeps http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/python-elementtree-1.2.6-5.el4.centos.i386.rpm
rpm -ihv --nodeps http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/sqlite-3.3.6-2.i386.rpm
rpm -ivh --nodeps http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/python-sqlite-1.1.7-1.2.1.i386.rpm
rpm -ihv --nodeps http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/yum-2.4.3-4.el4.centos.noarch.rpm

2. Then add Atomic repository that contains PHP for Linux Plesk servers and update PHP and MySQL:

rpm -ivh http://www.atomicorp.com/channels/atomic/centos/4/i386/RPMS/atomic-release-1.0-7.el4.art.noarch.rpm
rpm --nodeps -e php-domxml
yum update php*
yum update mysql*
yum install php-xml

3. Remove yum if you are done with software installationsas using "yum upgrade" or installing other packages can break the VPS:

rpm -e `rpm -aq | grep yum`

I hope this helps. Please advise if you have any further questions
« Last Edit: October 04, 2008, 05:42:19 AM by perestrelka » Logged

Kind Regards,
Vlad Artamonov
tmdevildogs
Trekkie
**
Offline Offline

Posts: 16


« Reply #5 on: October 02, 2008, 08:53:13 PM »

hi, the following comand did not work

rpm -ihv --nodeps http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/http://mirror.centos.org/centos-4/4/os/i386/CentOS/RPMS/python-elementtree-1.2.6-5.el4.centos.i386.rpm-2.9.8-2.noarch.rpm
Logged
tmdevildogs
Trekkie
**
Offline Offline

Posts: 16


« Reply #6 on: October 03, 2008, 07:33:32 AM »

so can someone please fix it?
Logged
perestrelka
Administrator
Master Jedi
*****
Online Online

Posts: 1311



« Reply #7 on: October 04, 2008, 05:43:02 AM »

Hi Tmdevildogs,

I have adjusted the instructions in the post. Can you please try them now and reply back, if you are still getting any errors/issues.
Logged

Kind Regards,
Vlad Artamonov
tmdevildogs
Trekkie
**
Offline Offline

Posts: 16


« Reply #8 on: October 04, 2008, 02:58:13 PM »

yes it worked now but at the end when  i tried to uninstall yum it gave me the following error

error:package rpm -aq | grep yum is not installed

so does that mean the uninstall didnt work?
Logged
perestrelka
Administrator
Master Jedi
*****
Online Online

Posts: 1311



« Reply #9 on: October 04, 2008, 11:31:45 PM »

yes it worked now but at the end when  i tried to uninstall yum it gave me the following error

error:package rpm -aq | grep yum is not installed

so does that mean the uninstall didnt work?

It looks like there were wrong commas used. You need to use inverted commas for `rpm -aq | grep yum` like it is specified in the forum post.
Logged

Kind Regards,
Vlad Artamonov
conga3
Knows just enough to get in trouble.
Spacescooter Operator
*****
Offline Offline

Posts: 37


WWW
« Reply #10 on: October 11, 2008, 11:59:55 PM »

perestrelka steps to upgrading PHP/MySQL would be very beneficial if it were a FAQ article.
Logged
perestrelka
Administrator
Master Jedi
*****
Online Online

Posts: 1311



« Reply #11 on: October 12, 2008, 10:31:58 AM »

Hi Conga3,

Thanks for your suggestion. The steps will be adopted to FAQ soon.
Logged

Kind Regards,
Vlad Artamonov
conga3
Knows just enough to get in trouble.
Spacescooter Operator
*****
Offline Offline

Posts: 37


WWW
« Reply #12 on: October 12, 2008, 11:00:14 AM »

I get this during final step:

[root@vps ~]# rpm -e `rpm -aq | grep yum`
error: Failed dependencies:
        yum >= 2.2 is needed by (installed) atomic-release-1.0-7.el4.art.noarch


Huh?


Also need 3 more steps:

-Replace /etc/my.cnf with /etc/my.cnf.rpmnew
-Replace /etc/php.ini with /etc/php.ini.rpmnew
-Reboot Server

« Last Edit: October 12, 2008, 11:37:31 AM by conga3 » Logged
vlad.panainte
SysAdmin
Spacescooter Operator
*****
Offline Offline

Posts: 35


« Reply #13 on: October 13, 2008, 02:49:25 AM »

Hello

 Download and install yum:

    * For RHEL 3 family:
         1. download the yum package from http://linux.duke.edu/projects/yum/download/ (the latest available 2.* package recommended)
         2. install yum version 2.0.* package

            # rpm -ivh yum-2.*.noarch.rpm
    * For RHEL 4 family:
         1. download the yum package and its dependencies from http://www.freevps.com/download/yum/RHEL4
         2. install yum version 2.6.* package and dependencies:

            # rpm -ivh yum-2.6.*.noarch.rpm sqlite-2.8.*.i386.rpm python-urlgrabber-2.9.*.noarch.rpm python-sqlite-1.0.*.i386.rpm python-elementtree-1.2.*.i386.rpm

I hope this is helpful.
Thank you
Logged
conga3
Knows just enough to get in trouble.
Spacescooter Operator
*****
Offline Offline

Posts: 37


WWW
« Reply #14 on: October 13, 2008, 08:42:36 AM »

The above steps by perestrelka installed:

PHP 5.2.6
MySQL - 5.0.58
MySQL client version: 4.1.20

How would I upgrade the MySQL client version to match the server version?  Isn't that preferred?  required?
Logged
Pages: [1] 2 3   Go Up
  Print  
 
Jump to: