Package:Drupal

Revision as of 20:58, November 11, 2014 by Threesixes (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

www-apps/drupal


Source Repository:Gentoo Portage Tree
Homepage

Summary: PHP-based open-source platform and content management system

Drupal

Drupal is a powerful Web-server-stack web application that can be used to craft custom websites, for example: http://www.whitehouse.gov

Install

Note

drupal likes php emerged with the gmp use flag enabled

# emerge drupal

MySQL

Warning

default "changeme" passwords are insecure, change them!

To create a database for drupal to interact with:

# mysql -u root -p
mysql> CREATE DATABASE IF NOT EXISTS `drupal` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
mysql> CREATE USER 'drupal'@'localhost' IDENTIFIED BY 'changeme';
mysql> GRANT LOCK TABLES, SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `drupal`.* TO 'drupal'@'localhost' IDENTIFIED BY 'changeme';
mysql> \q

webapp-config

Note

webapp-config is currently broken for Drupal so you must run it yourself:

To run webapp-config, you must know the version number of the webapp you're installing. To find the version number:

# equery l drupal

then run something similar to this, making sure to replace the version number with your current drupal version.

# webapp-config -I -h localhost -u root -d /drupal drupal 7.31

web install

Start your web server, and database.

nginx

configure your nginx similar to official documentation. http://wiki.nginx.org/Drupal

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

apache

If you are using apache 2.4, or newer run this sed command.

# sed -i 's\Order allow,deny\Require all granted\' /var/www/localhost/htdocs/drupal/.htaccess

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

Permission Adjustments

Enable Theme & Module Uploads

Note

if you're using nginx change to nobody:nogroup
# chown -R apache:apache /var/www/localhost/htdocs/drupal/sites/all/

Adjust for Security

# chmod 640 /var/www/localhost/htdocs/drupal/sites/default/settings.php

Post Install

base url

To set your base url:

/var/www/localhost/htdocs/drupal/sites/default/settings.php: ip address listening to external requests or domain name (php source code)
$base_url = 'http://0.0.0.0/drupal';  // NO trailing slash!

Cron

Drupal automates several tasks by cron. see official documentation to setup a cron job. https://www.drupal.org/node/23714

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

Troubleshooting

If you are having problems logging into the admin console flush your browser cache.

Media

Overview

Tutorials

External Resources