Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to install PHP5 without installing apache, in Ubuntu?

If so, how?

share|improve this question
up vote 44 down vote accepted
$ sudo apt-get install php5-cli  

Should do it.

share|improve this answer

Install php5 after php5-fpm if you plan to use nginx for example, because php5 needs one of either libapache2-mod-php5, libapache2-mod-php5filter, php5-cgi, or php5-fpm. Apt just picks the first package that satisfies the dependency.

$ sudo apt-get install php5-fpm php5
share|improve this answer
That does the trick! – Tilman Nov 12 '15 at 23:44

Yes, it is possible to install PHP5 without installing apache, in Ubuntu.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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