Welcome to Server Circle. It's a friendly site and all levels of experience are welcome. Be aware that we use cookies for your login.
Server Circle - Ask questions about Servers and get answers from experts.
Beta (0.72 sec)
PHP5 installation with Apache2 on Ubuntu

I am using:

aptitude install apache2 apache2-doc apache2-mpm-prefork apache2-utils apache2-suexec libexpat1 ssl-cert

for the Apache installation and:

aptitude install php5 apache2-mpm-prefork libapache2-mod-php5 php5 php5-common php5-mysql php5-xmlrpc

for the PHP installation.

Do I need all of the PHP files for a base installation ? Like php5-xmlrpc and apache2-mpm-prefork ? Thank you in advance.
Asked by:
TomPating
1355 points
 Report Abuse
 Share Page - Category: Ubuntu Linux - Tags: PHP5 installation with Apache2 on Ubuntu
 Enter your response
Please use Pastie.org to paste lengthy code or to fix formatting issues with code
  • Responses in reverse (2)

For apache and PHP the following files need to be installed. Please note no mysql packages are needed by default.

apache2 apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common

libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3

libaprutil1-ldap php5 php5-cli php5-common

If you want php5-mysql then the following will be installed

apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common

libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3

libaprutil1-ldap libmysqlclient16 mysql-common php5-cli php5-common

php5-mysql


Response by:
apjone
1478 points
The MPM is like the apache engine. You need one. When using mod-php5, I think you can only use the prefork or itk engines.

You only need to install libapache2-mod-php5, all the other needed packages will be installed automatically.

If you want to write php code that accesses a mysql database or processes xml... you can install additional php5-xxx packages. Again, only install what you actually need. That way when you no longer need it, you don't have to worry about what to uninstall.

If you want to use a php5 package that uses mysql, again, don't install php5-mysql, only install that package and it will install php5-mysql as a dependency. Only install php5-mysql (or mark it as manually installed) if you're doing some php5+mysql stuff that is not /packaged/ by ubuntu (such as php5 code you write yourself)

Response by:
s
3383 points


  • Related Questions
About Us : Contact Us : Etiquette : Terms : CDN Failover : ShorterURL : CDN Fallback : © 2013 Server Circle