Drupal Notes

So here we are again! Basic notes as to what I've done to lardup.inf (not already "documented") in the profile/headers.


Looked through the INSTALL.txt and created mysql DB from the command line:

mysqladmin -u root -p create dtest
mysql -u root -p`cat /var/lib/mysql/rootpwd`
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER   ON dtest.*   TO 'duser'@'localhost' IDENTIFIED BY 'xxxxx';
Query OK, 0 rows affected (0.00 sec)
  • Created /usr/share/drupal7/sites/default/settings.php based on template.
  • Needed to restart apache after installing php-mysql RPM as required PDO was not found.
  • Main user: d-user1 pass: Neil's throw away passwd.


Dear me, how time flies. Anyway, concentrating on this now. We have a dice/options/drupal.h header file, which doesn't give you a drupal service, but does add RPMs etc that are useful for a drupal service. For now, concentrating on what modules to enable (from core) and additional ones.

Core list: - = not enabled, + = enabled posted install, otherwise enabled by default

Core module
-Content translation
Contextual links
Database logging
Field SQL storage
Field UI
Core module
-PHP filter
Core module
Update manager

3rd party modules taken from list on https://www.wiki.ed.ac.uk/display/itpfwiki/Drupal+technical+meeting

Also look at http://drupal.org/project/backup_migrate and http://drupal.org/node/670460 (for staging/replication via drush)

Decided to install modules using 'drush', there's a drupal6-drush RPM, but not for D7. Took SRPM and latest drush tarball from drupal.org and built drupal7-drush-5.4-1.inf.1 (now part of drupal.h)


The Cosign module does not work with D7, however the author has Cosign_auth as a "works for him" sandbox dev thing. You have to fetch it via 'git', which I have and have copied into the /usr/share/drupal7/sites/all/modules/ dir as root. Handy tip, if you enable it (or the Cosign module) and find yourself locked out. Then use 'drush dis cosign cosign_auth' to disable the module again.

This might be useful http://www.agileadam.com/user-register-create-node

While looking at adding auto creation of users via cosign_auth. I went back to look at the original D7 Cosign dev module. And find it is working, perhaps because I'd since created a 'neilb' drupal user. I spotted it supports auto account creation, but it is not on by default. Turning that on seems to do the trick. Though I plan to scrub all I've done so far and try again to make sure. I've made some other changes to the original cosign module.

One tip if you just turn on cosign without having first creating an admin drupal account for yourself, you'll end up locked out. You can use drush to disable the module again, or you can add something like the following to say the HTTP virtual host config (temporarily!!!)

SetEnv REMOTE_USER d-user1
where d-user1 is your drupal "user 1" account.

The Clean Urls test is failing. I'm presuming this is because I've got cosign on now, and the URL it goes to to test clean URLs work, gets a redirect to cosign or a denied, which is causing the test to fail. I'm presuming disabling Cosign temporarily will then allow me to set this. Nope, that didn't work either. So as manual entered urls like /admin worked, and all the apache conf stuff was in place I used drush vset clean_url 1 to turn it on, and things seem fine. Turns out not to be so fine, breaks cosign config page. Even when not implicating cosign still get "admin not found" in apache error log.


A couple of pointers as I discover them, "projects" are case sensitive. So to download "Token" you spot that the URL is drupal.org/project/_token_, so you do drush pm-download token (dl is shorthand for pm-download)

Stuff below here is legacy from 2007 - Should just zap it - neilb Feb 2012

Drupal Notes

A place for me to jot down what I did to get Drupal running on DICE. I've a similar page for PloneNotes.

FC5 doesn't ship with any Drupal RPM, so first I downloaded the current 5.0 release of Drupal. There is a 4.X version, but I guess 5.X is the way it will be going.

I unpacked the tarball into scunner:/disk/scunner1/drupal/ and symlinked this (by hand) into /var/www/html/, so that http://scunner.inf.ed.ac.uk/drupal/ works. Read through the INSTALL.txt file in that directory to get the basic setup going.


Having done nothing other than unpack the tarball and symlink it to /var/www/html/ browsing to the web page gave an error about sites/default/settings.php not being writeable by the web user (though doing so is a security risk!). I changed the ownership of the settings.php from me to apache and tried the web page again. This time I got a drupal database configuration page. At this point it became clear it will need a MySQL or PostgreSQL database setup. I decided to go with MySQL, as several of our other services use that (see later for details of that). Once this was done, the auto setup script reset the permissions on the settings.php file.

I could now get an initial welcome screen, adivising that the first person to register would be given admin privileges, so I registered drupaladmin with the same laptop a like password as for Zope, and gave the email address as the services unit. Once that was done, it said there was an error with the config, and to check the status page http://scunner.inf.ed.ac.uk/drupal/?q=admin/logs/status . The problem was the cron jobs and the files_ directory not existing or being accessible. I chose to make files private and set the path to /disk/scunner1/drupal/files I made that directory owned by apache, and removed group and other perms. The recommended cronjob was added to the machines profile.

Setup MySQL

Added the dice/options/mysql-server.h header file and started the mysql component (which generates a root passwd). Then followed the INSTALL.mysql.txt file. I created a DB called drupal a user drupaladmin and passwd seeneil.

I then filled out these details on the install web form on http://scunner.inf.ed.ac.uk/drupal/, though I had to click the advanced link to set the host name to from localhost. As otherwise it tried to connect via a socket in the standard place, but it isn't in the standard place.

-- NeilBrown - 14 May 2007

Topic revision: r16 - 06 Jul 2012 - 16:36:38 - NeilBrown
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies