This seems like it should be easy to answer, but as a php newbie, I can't find out what exactly I need to install.

Some sites recommend just httpd, php and php-common; other suggestions include php-fpm and mod_fastcgi, as well as a bunch of php packages.

My goal is to be able to set up my dev machine and an amazon EC2 instance to be as similar as possible.

What do I need to install?

  • This looks more like a question for StackOverflow than for ServerFault, because as far as I can see you're trying to learn PHP and not installing/using some PHP based software. Anyway, to make my comment more useful, installing the php package on Fedora should be enough for starting things up. Oct 12, 2012 at 19:55
  • @CristianCiupitu No, this is about AWS instances and how to deploy them with a set of software reproducibly. Oct 12, 2012 at 21:55
  • @AlexanderJanssen - I guess the question isn't as clear as it should be, but what I'm looking for is details on the required stack for hosting php - web server, plugins, and the php runtime.
    – chris
    Oct 13, 2012 at 1:46

2 Answers 2


On Fedora 17 it's sufficient to install the php package. This pulls in all necessary dependencies, including Apache.

On previous versions of Fedora, and current versions of RHEL, you need to install mod_php.

  • I think the OP wants to know how to install the necessary packages via the user-data from AWS. To be honest, I invested an hour of research into it: I did this before with Ubuntu just to learn that it doesn't work like that with Fedora. They have their own funky way of dealing with user-data, and until now I didn't grok how the utilize /etc/cloud. The documentation is, midly said, crap. At this moment I'm talking to the Fedora-cloud people and I hope I'll be getting some insight... I'm really curious myself. Oct 12, 2012 at 20:52

Try AMI ami-2ea50247 from the Fedora Cloudimage site.

Then use as user-data in the AWS-console:

yum -y install httpd php php-common php-fpm mod_fcgid

I just tried it because I was curious. Works like charm. Thanks to gholms from #fedora-cloud on Freenode for the hint about adding the hashbang.

If you need more machines, just "launch more like this".

You might want to add this to user-data:

chkconfig httpd on
service httpd start

To make it start automatically and right away after instance creation. Your pick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.