

I followed some documents found on the web, but basically the installation procedure was even faster than that found on the web:
I put these lines in /etc/make.conf:
USE="apache2 mysql php pam ssl xml xml2 berkdb innodb jpeg png"
If you want to install also phpmyadmin, then you should also add pcre session unicode:
USE="apache2 mysql php pam ssl xml xml2 berkdb innodb jpeg png pcre session unicode"
then I simply ran:
emerge dev-db/mysql apache php
after few minutes (well... half an hour would be more appropriate) the installation terminated successfully.

I then changed the file /etc/init.d/apache2, in order to enable public_html folders for users (corresponding to the ~ directory), setting -D USERDIR:
APACHE2_OPTS="-D DEFAULT_VHOST -D PHP5 -D USERDIR"
Before starting mysql, you must create (once and for all) the mysql main database, and this can be done simply by running:
/usr/bin/mysql_install_db
then you're ready to start apache and mysql.
Thanks!!! this is the best guide i've found! :) I'm now loving Gentoo :P
ReplyDeleteuh you're too kind :-)
ReplyDeleteglad you found that useful and that you started loving Gentoo!
happy hacking!
I try and be Nice :)
ReplyDeleteInstead of editing:
ReplyDelete/etc/init.d/apache2
it should be:
/etc/conf.d/apache2
bb
Good info. I am trying to get LAMP working on gentoo, since new to gentoo emerge thing, i just removed the php and installing it from source.
ReplyDeleteI was checking out Gentoo, and just installed php and apache, but my PHP files are not working with apache so when I tried to open http://localhost/test.php it shows the contents of PHP file instead of executing it on apache web server.
ReplyDeleteany idea?
sorry it has taken a lot time, but it works perfect :-)
ReplyDeleteExcellent, adding the USE flags did the job...without them only frustration invaded me!
ReplyDeleteThanks a lot.
This is a ggreat post
ReplyDelete