I have a problem with removing Apache from my CentOS install. First of all I installed lighty (lighttpd) and then I tried to install php53 which httpd was included with it.

I've configured lighty with php and now I don't need httpd for any reason so I want remove it.

When I try to remove httpd from my centos 5.7 server with yum it prompts to remove php.

So how can I remove httpd while keeping php ?

  • should probably be moved to superuser – g19fanatic Nov 16 '11 at 12:20

Assuming this is the php53 stock from CentOS, you can safely remove the php53 package. The binary at /usr/bin/php is provided by php53-cli, not by php53. The other php53 packages/modules you have installed will not be removed.

The php53 package provides the php module for apache which is why it is being removed when you try to remove Apache. It just has a bad name that can easily lead to confusion thinking you're uninstalling all of php53 when you're not.

The following might clear up any confusion:

# see what is inside the php53 RPM.
# this is what is being removed when php53 is removed
# notice its all stuff for the Apache HTTPd server
rpm -ql php53

# show all the php53 packages installed.
# notice how they're all sticking around and not being removed
rpm -qa 'php53*'
|improve this answer|||||

Your Answer

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