Great but what is good Idea I mean what is best, yum or compile... this is just a testing server.
Well, that depends on what you want to do with it. If you only want to learn php, then use yum. If you want to learn how apache/php compiles then compile from source.
yum will also give you the advantage of keeping things in control when patches and updates come in. If you compile from source you'll have to do all that yourself.