Gentoo Linux - Installing Apache2/PHP

January 2017




As for all installation purposes under Gentoo, Portage will handle the installation of packages and managing dependencies.

Installing Apache2

  • The installation of Apache2 will start with the command:
    • emerge apache
  • To start the server:
    • # / Etc/init.d/apache2 start 
  • The configuration file for apache2 is /etc/apache2/httpd.conf

Installing PHP

  • First of all we must modify tags in the global variable USE before starting the installation. Then start executing the commands:
    • # euse -E apache2 mysql cgi pam ssl xml # emerge -av dev-lang/php
  • Once installation is complete, check that /usr/lib/php5/bin/php-cgi exists. Then restart apache:
  • # /etc/init.d/apache2 restart

Related


Published by jak58. Latest update on February 12, 2010 at 08:25 AM by jak58.
This document, titled "Gentoo Linux - Installing Apache2/PHP," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).