Skip to main content
Welcome guest. | Register | Login | Post

Upgrading to mySQL 5 and PHP 5 on a (dv) Dedicated-Virtual 3.0 server from MediaTemple

28 replies [Last post]
Joined: 2007-07-27

Hi, I am basically new to Linux.
I am testing a virtual dedicated server from MediaTemple, and am in need of upgrading to mySQL 5 and PHP 5.
MT's knowledge base doesn't feature any step-by-step process description.
I've heard about YUM, but don't know how to install and/or use it.

Can anyone help me through this?

Thank you very much!!


free-zombie's picture
Joined: 2006-03-08
What distribution is

What distribution is installed on the server ?

Joined: 2007-07-27
arrhhh... this should tell

arrhhh... this should tell you how much this is new to me. I've looked around and couldn't find any info about the OS etc.. I have links to the feature list: and to the Developer Tools (that I already requested they be installed) I see there is Apache 2.0.52 (CentOS). Plesk 8.2.0 is running with Virtuozzo, can you tell me how to fetch the info you need, via Plesk or SSH? Thank you so much!

free-zombie's picture
Joined: 2006-03-08 — looks like CentOS 4.4, which is old (CentOS 5 was released in april) and includes only PHP4. MySQL5 isn't even in CentOS5, for that matter.

The KB articles and look like decent starting points.

Joined: 2007-07-27
Wow, that's an awful lot of

Wow, that's an awful lot of stuff to do for each and every website?
I thought that once PHP5 was installed on the machine, it would "just work". Hehe... I have to get used to this. Until now I had the IT guy from the studio do everything for me on the studio server, now I'm starting to do things on my own.

Isn't there just a quality hosting with PHP5/mySQL5 on a shared or virtual dedicated environment, so I don't have to take care about this?
With MT I'm paying 45/mo for this (barely 400MB of useful RAM, 100GB of space, and a 2.33Ghz XEON cpu).

free-zombie's picture
Joined: 2006-03-08
Of course there are other

Of course there are other hosts. May I ask why you went for a virtual server, if you don't know how to administrate it ? I ask because shared hosting is usually good enough.

Joined: 2007-07-27
Well, I've moved from

Well, I've moved from shared hosting to "Grid Server" (clustered) a while ago and had a huge amount of problems with it, as MediaTemple was trying to address a series of problems.

In the end I find out that what they think is "resource intensive", is merely mid-complexity SQL queries, necessary to make administration GUI's a little user friendly.
Two weeks ago I had to redesign a critical mask of an admin panel, reducing the amount of data visualized by 70% (removing each and every table join from the queries, where possible), because the page would take 7 to 9 seconds to render. I did some benchmarking with the dedicated server my studio has in Italy (which is 3 years old), and I found out that the raw performance of MT's "Grid" (with or without contained mySQL) was 50 to 80% slower than our server (which is also heavy loaded). What MT did a great job at, is enhancing the buffering system: when it kicks in, everything goes wildly fast, a good 30% faster than on our server. But this is pretty useless if you don't get at least 2000 displaced hits a day, because the cluster tends to "forget" about your site.

For this reason, and because in about a month I will be maintaining a total of 5 websites, 2 of which will be "resource intensive" (as MT say), so I might be pushed out of the shared environment, leaving me with no choice anyway.

I am going to start a project next week, which requires superior scalability, to an extent that only mySQL 5 can deliver, with views, functions and procedures. This is because I probably won't be able to follow further developments on the project, so it is my intent to make it as intuitive and easy to build upon as possible.

This is why I need a mySQL 5 (PHP 5 would be great too, so I can use OOP and leave the client with a flexible API, instead of a series of procedures).
And why I probably need a dedicated environment. Plus I will be charging the whole cost of the hosting to my latest client. This means I can easily afford some extra features if they become necessary.

free-zombie's picture
Joined: 2006-03-08
(all code is to be entered

(all code is to be entered as root in a shell, comments start with # and need not be ommited)

so, first, you'll need yum:

# go to root's home directory /root
cd ~
# download the package
# install it
rpm -ivh yum-2.4.3-3.el4.centos.noarch.rpm

then, have a look at to enable a repository including php5 and mysql5. To edit /etc/yum.repos.d/CentOS-Base.repo, run nano /etc/yum.repos.d/CentOS-Base.repo (or your editor of choice if you have one and it's installed). Be sure to only include php and mysql, as described in the wiki

Then, updating should be as easy as running

yum update

WARNING: like most experimental system administration, this could cripple your system or do exactly what you want.

Joined: 2007-07-27
Wow, thanks I will try that

Wow, thanks I will try that this afternoon!

I know about the risks, this is open source. But maybe that's why a virtual dedicated is cool: my system is clean, I can ask the host to reset it and start again.

Thank you very much.

Joined: 2007-07-27
Ok I tried to install and

Ok I tried to install and it failed due to dependencies missing.

warning: yum-2.4.3-3.el4.centos.noarch.rpm: V3 DSA signature: NOKEY, key ID 443e1821
error: Failed dependencies:
python-elementtree ...
python-sqlite ...
urlgrabber ....

I've checked and yes, all three of those are missing from the standard set of modules, and from the "Developer Tools" set.

p.s. do I need to read/install a key too?

free-zombie's picture
Joined: 2006-03-08
I don't think a key should

I don't think a key should be necessary. Not having yum by default is pretty useless, but oh well...

You'll need to download (run wget for) RPM files of all dependencies (get them from ) and run rpm -ivh *.rpm instead of just installing the one package.

Joined: 2007-07-27
Ok, i downloaded the rpms

Ok, i downloaded the rpms for python-urlgrabber, python-sqlite and python-elementtree.
Tried installing *.rpm and got a new dependency failure:
python-sqlite-1.1.7-1.2.1.i386 requires: libsqlite3.os.0

Joined: 2007-07-27
OK, I looked better and

OK, I looked better and found an sqlite rpm.
Installed that first, then python-sqlite.
I managed to install everything, including YUM.


I will now proceed to editing the repo.

Cross fingers!

Joined: 2007-07-27
Yes, yes, yes, yes,

Yes, yes, yes, yes, yessssss!!!!!

In this very moment, I feel like superman! It worked! Took me a while.
YUM updated some 190 packages, including mySQL and PHP.
mySQL is pretty straightforward, it just works.
PHP needed to be set up for the single domain, as in the procedure you linked, but it now works!!

HAHAHAHAHAHAHHAHA it's like if it were my birthday, it just feels so great! YEAH!

Thank you so much, I really owe you one!

Cheers to you!

libervisco's picture
Joined: 2006-05-04
Man it's been a while since

Man it's been a while since I saw someone expressing such happiness after getting something to work. Makes me happy just to see it too. Smiling

Free-zombie, you deserve a star! Eye Good work guys!

Oh and welcome to Nuxified acolonna. Smiling


Joined: 2007-07-27
Thanks libervisco! In fact,

Thanks libervisco!

In fact, just a note: I don't think per-domain PHP set up is required. Because after server restart, PHP was automatically run as 5.1 on other domains too. COOL


This means that PHP4 is off the system though. For anyone willing to have 4 and 5 side by side, they will have to install PHP manually.

free-zombie's picture
Joined: 2006-03-08
libervisco wrote:

Free-zombie, you deserve a star! Eye




libervisco's picture
Joined: 2006-05-04
Yep, if those domains point

Yep, if those domains point to the same server as soon as you set up PHP on that server it's available for all domains on it.

I think it's possible to set up both 4 and 5 running simultaneously, but that probably is less and less necessary considering that most applications are switched or switching to PHP 5 support. There was even an announcement recently that PHP 4 support is discontinued.


Joined: 2007-07-27
Bah, I know this will sound

Bah, I know this will sound really BAD said here, but I'm not for OS applications.
Not that I'm against them in general. It's that I don't like web firms deploying applications based on free OS software.
Shelf innovation is the key to success in this field, obviously, but firms need to have internal development teams, that build proprietary technology.

This is for a simple reason: it's the firm that must define connection standards, and not have to cope with those defined by others.
I've lived a miserable life for the past two years, having to deal with the most illogical solutions that the Drupal project has been featuring. Some of which are close to stupidity. In the end I know it would have cost me less to build a framework from scratch myself.
But the firm is yet too small, can't afford proprietary technology and has to stick with deadlines. The quality of the output is just fair: low.

This is why I'm against OS web application frameworks. I think they are one good reason for the poor quality of portals seen around.

What do you think about it?

Joined: 2007-07-27
I have posted the

I have posted the step-by-step procedure in my newly started blog.

For reference. Please tell me if I wrote something idiotically wrong Smiling


free-zombie's picture
Joined: 2006-03-08
acolonna wrote: I have
acolonna wrote:

I have posted the step-by-step procedure in my newly started blog.

For reference. Please tell me if I wrote something idiotically wrong Smiling

About Vim ­— you may rather want to link to or some other simple HOWTO, not the full-blown docs.

The requirement for a second IP and the Dev tools surprise me, but you're the MT customer who's done this, not me.

You might want to consider linking to and/or this thread.

Joined: 2007-07-27
You are perfectly right! I

You are perfectly right!
I will do that straight away.

libervisco's picture
Joined: 2006-05-04
Just wanted to applaud you

Just wanted to applaud you for sharing the solution with everyone on your blog. Smiling


Joined: 2007-08-23
Had problems following the procedure.

I followed the procedure as outlined at:

And I ran 'yum update', the end of the output is this:

--> Processing Dependency: php-pdo for package: php-odbc
--> Processing Dependency: for package: php51-mysqli
--> Processing Dependency: for package: psa
--> Processing Dependency: for package: psa-bf2
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package php-common.i386 0:5.1.6-3.el4s1.7 set to be updated
---> Package mysql-libs.i386 0:5.0.46-1.el4.centos set to be updated
---> Package mysqlclient14.i386 0:4.1.22-1.el4s1.1 set to be updated
---> Package php-pdo.i386 0:5.1.6-3.el4s1.7 set to be updated
---> Package php-cli.i386 0:5.1.6-3.el4s1.7 set to be updated
--> Running transaction check
--> Processing Dependency: php = 4.3.9-3.22.5 for package: php-domxml
--> Finished Dependency Resolution
Error: Missing Dependency: php = 4.3.9-3.22.5 is needed by package php-domxml

With that, it terminates. How can I resolve the missing dependency?

I tried this solution:

[~]# wget
           => `php-domxml-4.3.10-2.4.i386.rpm'
Connecting to||:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /linux/fedora/core/updates/2/i386 ... done.
==> PASV ... done.    ==> RETR php-domxml-4.3.10-2.4.i386.rpm ... done.
Length: 47,169 (46K) (unauthoritative)

100%[=================================================================================>] 47,169        70.48K/s

11:33:05 (70.25 KB/s) - `php-domxml-4.3.10-2.4.i386.rpm' saved [47169]
[~]# rpm -ivh php-domxml-4.3.10-2.4.i386.rpm
warning: php-domxml-4.3.10-2.4.i386.rpm: V3 DSA signature: NOKEY, key ID 4f2a6fd2
error: Failed dependencies:
        php = 4.3.10-2.4 is needed by php-domxml-4.3.10-2.4.i386

How to resolve? Thanks in advance for all assistance!

Joined: 2007-07-27
You have a different distribution

Hi Don,
I see you are on a different distribution. I have to say it was probably unwise to follow the instructions of a new-bye like myself, adapting them to a different situation.
You probably should have posted here before starting the job.

Anyways, if you are not using DOMXml I'm sure you could uninstall it, thus addressing the issue. It's an Object Oriented framework that lays on top of PHP (there is quite a difference in OOP handling between 4.* and 5.*).
But sit tight and wait for a pro to give you some real advice.. IT ain't that comfortable in't it?

Good luck!

Joined: 2007-08-23
Actually I'm on the same

Actually I'm on the same distribution. I'm using CentOS 4.4. In fact, I'm on the same host you are -- I'm using the MediaTemple (dv) plan.

As for being a newbie, I have news for you, my friend. I'm a newbie too. Sticking out tongue

I don't think I'm using DOMXML, but I'd rather not risk uninstalling it (unless the yum update, when it updates to PHP 5 & MYSQL 5 will install it?). I'm fine with "waiting for a pro to give me real advice", as you have put it. It isn't too uncomfortable waiting, because ATM, my server is running fine on PHP 4. None of my customers are demanding PHP 5/MySQL 5 just yet. I just wanted to upgrade to 5 now, so I wouldn't have to worry about it later when I take on more customers. I currently have two customers, with four more coming. I figured it'd be better to do the upgrade now while my customer base is small rather than do it later and have to deal with alot of pissed off customers if something goes horribly wrong. Eye

Joined: 2007-07-27
I've looked around on

I've looked around on and it looks like you MUST take out DOMXml from the machine before installing PHP5.

That is probably because there is still no update for it. PHP 5 handles OOP in a very different way, so I think the thing will be have to be rebuilt from scratch probably.
If you're not using it, there is no need for it to be there.

It is strange though, because my (dv) 3.0 server wasn't featuring it at all (otherwise I would have posted info on how to uninstall it).

I think a good advise would be to stick to the repository for your distribution. I'm not sure, but I think there may be some differences between a software under fedora and centos (or others). So if you have CentOS 4.2 or something, your should stick to the softwares available for your version.

free-zombie's picture
Joined: 2006-03-08
just remove it. You're the

just remove it. You're the admin, you're the webmaster, you're the one that should know what's needed. If it turns out that you needed it after all and it's possible to use domxml on php5, you'll be able to install it. (Though I don't think domxml exists for php5 tbh)

Joined: 2007-08-23
Well, it probably got

Well, it probably got installed from one of my last three attempts to upgrade to PHP5/MySQL 5.

How exactly do I remove it? Pardon my newbiness. I'm still learning. Sticking out tongue

I just did "yum remove php-domxml" and it seems like it's uninstalling plesk? Uh-oh. Sad

Edit 2:
Ran "yum update", it seems to be upgrading everything. Hopefully Plesk won't be broken later...

Edit 3: Yum just finished. Plesk got broken. All of my sites are now down. How to resolve? Sad

Edit 4: I just restored the server from a backup. Thank god for backups...

Is there a way to upgrade to PHP5 and MySQL5 without breaking Plesk?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.