Borner
Posts: 49
Joined: Tue Sep 25, 2012 2:53 pm
Location: .de

installing PHP requires apache?

Mon Oct 08, 2012 8:07 pm

Hi,

I like to setup an webserver using nginx. For my project I need some php modules, like this:

Code: Select all

apt-get install php5 php-xml-serializer php5-gd php5-sqlite
Running this apt-get command, apt find some requirements:

Code: Select all

  apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common
  libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3
  libaprutil1-ldap libonig2 libqdbm14 php-pear php-xml-parser php5-cli
  php5-common ssl-cert
As you can see apache is selected!?!

After installing those packages, the apache webservers starts automaticly.
Does anybody know, why?
Is there a way to avoid apache installation?
Maybe by installing ngxinx and php5-fpm before installing php5?

Thank you!

User avatar
vladb
Posts: 26
Joined: Mon Jan 16, 2012 4:06 pm

Re: installing PHP requires apache?

Mon Oct 08, 2012 8:17 pm

It is possible. I use this for cli-only install

Code: Select all

apt-get install php5-cli php5-common php5-fpm php5-cgi php5 php-pear php5-mcrypt php5-mysql php5-gd php-apc memcached

Borner
Posts: 49
Joined: Tue Sep 25, 2012 2:53 pm
Location: .de

Re: installing PHP requires apache?

Mon Oct 08, 2012 8:28 pm

I use this for cli-only install
..this menas, the package php is the one who needs the apache package?!


//EDit: oh no.. after re-reading your post I see, you also installed the package php5
Does installing php-cli results in the effect, that apache2 is not needed? Strange!

Borner
Posts: 49
Joined: Tue Sep 25, 2012 2:53 pm
Location: .de

I have got it.

Mon Oct 08, 2012 9:13 pm

It lookes like the solution is to install the webserver befor installing php.
In my case: if I install nginx before php, so the php installation does not install apache anymore.

wow.

User avatar
penguintutor
Posts: 390
Joined: Tue May 08, 2012 9:11 am
Location: UK
Contact: Website

Re: installing PHP requires apache?

Wed Oct 10, 2012 2:04 pm

This is explained looking at the PHP5 package information.

http://packages.debian.org/sid/php5

This package is a metapackage that, when installed, guarantees that you have at least one of the four server-side versions of the PHP5 interpreter installed.

php5-cli has less dependencies and doesn't need a web server installed.

Borner
Posts: 49
Joined: Tue Sep 25, 2012 2:53 pm
Location: .de

Re: installing PHP requires apache?

Fri Oct 12, 2012 12:14 pm

okay.. i see. Thank you, that was an important information for me!

Return to “Beginners”