Gentoo Linux - Installing Apache2/PHP

Ask a question

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

LAMP (Apache + MySQL + PHP) - quick install on Linux
Apache - Configure htaccess for Apache