Middlebury

Drupal Development

Revision as of 10:52, 27 July 2009 by Adam Franco (talk | contribs) (Add your user to the SVN configuration: Fixed paths to add config/)

_

_

Checking Out the Project

Add your user to the SVN configuration

On chisel:

  • emacs /var/svn/repos/drupal/conf/authz
    • Add "username = rw" where username is your username below the "imcbride = rw" line
  • emacs /var/svn/repos/drupal/conf/passwd
    • Add "username = password" where username is your username and password is the password you'd like to use for SVN
  • emacs ~/.subversion/config
    • Uncomment L13 "store-passwords = no"
    • Uncomment L19 "store-auth-creds = no"

Checking out drupal

svn checkout svn://chisel.middlebury.edu/drupal/trunk drupal_dir_name

Remember the value you use for "drupal_dir_name" as you will need to enter it later.

Set up the database

Create a new database on chisel using http://chisel/phpmyadmin. If you preface the database name with "drupal_", the testuser account will have automatic access to the database. Otherwise, you will need to set up user privileges for the database. In order for drupal to work with the modules we have installed, you will need to grant the database user the following privileges:

  • Data
    • SELECT
    • INSERT
    • UPDATE
    • DELETE
    • FILE
  • Structure
    • CREATE
    • ALTER
    • INDEX
    • DROP
    • CREATE TEMPORARY TABLES
    • SHOW VIEW
    • CREATE ROUTINE
    • ALTER ROUTINE
    • EXECUTE
    • CREATE VIEW
  • Administration
    • LOCK TABLES
    • REFERENCES

You can import a blank database from the central drupal instance:

mysqldump -u testuser -p -h chisel.middlebury.edu drupal > ~/drupal.sql
mysql -u testuser -p -h chisel.middlebury.edu your_db_name < ~/drupal.sql

Set up the Webserver

You do not need to perform this step if you are setting up Drupal in your user home directory on chisel, however it is required when setting up new pre-production instances on longhouse. You must be logged in as root to perform these actions.

Edit /etc/httpd/conf/httpd.conf and add the following in the Directory section:

<Directory "/path/to/drupal">
  AllowOverride All
</Directory>

Then run "service httpd restart".

Set up the Filesystem

Assuming you've set this up in ~/public_html/drupal_dir_name on chisel:

  • cp /var/www/html/drupal/.htacccess ~/public_html/drupal_dir_name
    • Edit L101 to read "RewriteBase /~username/drupal_dir_name".
  • cp /var/www/html/drupal/sites/default/settings.php ~/public_html/drupal_dir_name/sites/default/
    • Edit L93 to end with the name of the database you set up previously.
  • chmod -R 777 ~/public_html/drupal_dir_name/sites/default/files