xaoseric
xaoseric

Reputation: 33

Install php without httpd on CentOS 7

I have nginx installed, and I want to install php, but when I install php with yum install php, it requires httpd. Is there a way I can install php without installing httpd?

Upvotes: 1

Views: 3638

Answers (2)

John Smith
John Smith

Reputation: 1089

When you call (skip sudo when calling under root)

$ sudo yum install php

yum does want to install httpd (Apache web-server) as a dependency. In your case, since you are planning to use nginx you definitely do not need httpd. In order avoid httpd installation, but still have a working php call

$ sudo yum install php-fpm php-common php-cli

Upvotes: 1

Jerodev
Jerodev

Reputation: 33186

With nginx you should use php5-fpm:

yum install php5-fpm

Upvotes: 3

Related Questions