35

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

If so, how?

JeffG
  • 1,194
  • 6
  • 18
Ryan
  • 5,831
  • 24
  • 72
  • 91

3 Answers3

57
$ sudo apt-get install php5-cli  

Should do it.

JeffG
  • 1,194
  • 6
  • 18
EEAA
  • 109,363
  • 18
  • 175
  • 245
18

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
BntMrx
  • 301
  • 3
  • 10
-3

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

According to this answer: https://serverfault.com/a/243301/232590

sudo apt-get install php5-cli 
JeffG
  • 1,194
  • 6
  • 18