Drupal

Drupal is a powerful PHP content management system (CMS).

Preinstall
Edit and add "apache2 php gd" to your USE flags.

Edit and add "dev-lang/php mysql mysqli postgres" to PHP USE flags then merge up LAMP.

PHP5 notes:

must be built with pcre and session USE flags.

If you rebuild php5 changing flags you will need to restart apache2.

Scroll up into the emerge log and setup the root user for mysql running the command printed.

Edit and add   to your   line.

Start up your LAMP stack

Set the LAMP stack to start upon boot

Unmask
At the time of writing, is masked as experimental only. If you run a "stable" system, you'll have to add it to your.

Emerge
Now we can get on with emerging:

You will have to run webapp-config manually.

you may change localhost to the hostname of your virtual host/website.

Web Install
if you are using apache 2.4 or newer run this sed command once.

point your browser to http://localhost/drupal/install.php

Maintenance Mode Access
If you suddenly find your self locked out of your drupal cms because it is in maintenence mode:

http://localhost/drupal/user

Cron
Many Drupal modules have periodic tasks that must be triggered by a cron job. To activate these tasks, you must call the cron page. This will pass control to the modules and the modules will decide if and what they must do.

The following example crontab line will activate the cron script on the hour (you can edit the crontab with crontab -e:

0 * * * * wget -O - -q http://localhost/drupal/cron.php

Installing Drupal modules
Installing and configuring modules for Drupal is a lot of fun. You can browse the list at http://drupal.org/project/Modules. Untar the packages to drupal/modules but remember, you have to update the database manually for most modules! Installation instructions come with the tar package.

For example, if you want to install the Daily module, and your user for mysql is drupal: