Drupal

Differences between revisions 4 and 19 (spanning 15 versions)
Revision 4 as of 2009-03-09 06:09:13
Size: 4898
Editor: host-181-59-107-208
Comment:
Revision 19 as of 2010-07-04 13:32:47
Size: 4771
Editor: 41
Comment: on Drupal.org it's said that this project no longer exists
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from UbuntuDrupal/Setup
Line 7: Line 8:
  * We assume you:
  * are not scared of CLI (and using bash)
  * will be using Drupal 6.x
  * have a little experience with websites
  * will be using /var/www for your source
  * will be using yoursite.com to refer to your site
  * were not offended here (we did say basic)
  This guide assumes you:
  * Are not scared of CLI (and using bash)
  * Will be using Drupal 6.x
  * Have a little experience with websites
  * Will be using /var/www for your source
  * Will be using yoursite.com to refer to your site
  * Were not offended here (we did say basic)
Line 17: Line 18:
  1. Grab latest release from [[http://www.drupal.org]]
  1. Unpackage inside /var/www (Move everything outside the drupal directory)
  1. Grab the latest release from [[http://www.drupal.org]]
  1. Unpack to /var/www/drupal6
    a. If you install Drupal through the repositories the directory will be different
  1. Create an Apache configuration
    a. vim /etc/apache2/sites-available/drupal6
  1. Enable the configuration
    a. a2ensite drupal6
  1. Restart Apache
    a. /etc/init.d/apache2 restart

Sample Configuration:
{{{
## This is a basic config; mine has some extras for security.
<VirtualHost *:80>
  DocumentRoot /var/www/drupal6

  <Directory /var/www/drupal6/>
    Options +FollowSymLinks

    ## These rewrites allow for CleanURL's
    RewriteOptions inherit
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

    AllowOverride All
    order allow,deny
    allow from all
  </Directory>
</VirtualHost>
}}}
Line 22: Line 54:
  1. Create a database and database user
      Replace $database and $pass with appropriate values
    1. echo "CREATE DATABASE $database;" | mysql -uroot -p
    1. echo "GRANT ALL ON $database.* TO '$database'@'localhost' IDENTIFIED BY '$pass';" | mysql -uroot -p
Create a database and database user
 * Replace $database and $pass with appropriate values
{{{
echo "CREATE DATABASE $database;" | mysql -uroot -p
echo "GRANT ALL ON $database.* TO '$database'@'localhost' IDENTIFIED BY '$pass';" | mysql -uroot -p
}}}
Line 27: Line 61:
= Create Website = = Create Website Files =
Line 29: Line 63:
  1. Create website files (We prefer a multisite setup for stability purposes)
    1. cd /var/www/sites
    1. mkdir -p yoursite.com/{files,modules,themes}
    1. cp default/default.settings.php yoursite.com/settings.php
    1. chmod 777 yoursite.com/settings.php yoursite.com/files
  1. Grab the latest module/theme builds
    1. Alternatively, you can grab a latest stable from the [[ https://launchpad.net/ubuntu-drupal/6.x | ubuntu-drupal ]] project
    1. cd /var/www/sites/yoursite.com
    1. If you DO NOT have a Launchpad account:
      1. bzr branch https://code.edge.launchpad.net/~ubuntu-drupal-modules/ubuntu-drupal-openid/6.x modules/openid
      1. bzr branch https://code.edge.launchpad.net/~ubuntu-drupal-modules/ubuntu-drupal-launchpad/6.x modules/launchpad
      1. bzr branch https://code.edge.launchpad.net/~ubuntu-drupal-modules/ubuntu-drupal-teams/6.x modules/teams
      1. bzr branch https://code.edge.launchpad.net/~ubuntu-drupal-themes/ubuntu-drupal-theme/6.x themes/ubuntu-drupal
    If you DO have a launchpad account:
      1. bzr launchpad-login
      1. bzr branch lp:ubuntu-drupal-openid modules/openid
      1. bzr branch lp:ubuntu-drupal-launchpad modules/launchpad
      1. bzr branch lp:ubuntu-drupal-teams modules/teams
      1. bzr branch lp:ubuntu-drupal-theme themes/ubuntu-drupal
  1. Create entry in hosts file for loopback
    1. echo "127.0.0.1 yoursite.com" >> /etc/hosts
''The Ubuntu Drupal team suggests using a multisite setup)''

{{{
cd /var/www/drupal6/sites
mkdir -p yoursite.com/{files,modules,themes}
cp default/default.settings.php yoursite.com/settings.php
chmod 777 yoursite.com/settings.php yoursite.com/files
}}}

= Grab module/theme builds =

== Option 1: [Stable] ==

Drupal.org is used to host the stable releases of the modules/theme. You can use the following URL's to grab them. This is suggested over grabbing the development versions because you will automatically be notified of updates.

/var/www/drupal6/sites/yoursite.com/themes
  * http://drupal.org/project/udtheme-2010

/var/www/drupal6/sites/yoursite.com/modules
  * http://drupal.org/project/udheader
  * http://drupal.org/project/udsidebar
  * http://drupal.org/project/udcountdown
  * http://drupal.org/project/udplanet

== Option 2: [Development] ==

Using the development copies should just be used for development or testing purposes. Unless you have a solid reason for using the development version, it's suggested that you use the previous method.

First, you need to install bazaar:
{{{
sudo apt-get install bzr
}}}

'''Optional:''' To configure bazaar to talk to your launchpad account:
Read the [[ http://jpipes.com/index.php?/archives/249-A-Contributors-Guide-to-Launchpad.net-Part-1-Getting-Started.html | Contributors guide to launchpad ]]. Then:
{{{
bzr launchpad-login YourLaunchpadID
bzr whoami "FirstName LastName <your@email.com>"
}}}


If you configured bazaar to talk with your LP account, you can run a few short bzr commands.
{{{
cd /var/www/sites/yoursite.com

## Theme
bzr branch lp:ubuntu-drupal-theme themes/ubuntu-drupal

## Ubuntu-Drupal Managed
bzr branch lp:ubuntu-drupal-header modules/header
bzr branch lp:ubuntu-drupal-sidebar modules/sidebar
bzr branch lp:ubuntu-drupal-countdown modules/countdown
bzr branch lp:ubuntu-drupal-locomap modules/locomap
bzr branch lp:ubuntu-drupal-planet modules/planet

## Canonical Managed (OpenID)
bzr branch lp:ubuntu-drupal-openid modules/openid
bzr branch lp:ubuntu-drupal-launchpad modules/openid-launchpad
bzr branch lp:ubuntu-drupal-teams modules/openid-teams
}}}
Line 64: Line 137:
  1. Go to yoursite.com/admin/build/modules
    1. Enable "OpenID" in "Core - optional" section
    1. Enable "Launchpad OpenID" in "Other" section
    1. Enable "OpenID Teams" in "Other" section
    1. Click "Save Configuration"
  1. Go to yoursite.com/admin/build/themes
    1. Select "Ubuntu-Loco" theme
    1. Click "Save Configuration"
  1. Go to admin/build/blocks
    1. Move the "Launchpad Login Button" underneath the "User Login" block.
    1. Disable to login block (after testing)
    1. I usually set the "Block title" to "<none>"
  NOTE: Defaults past this point should be acceptable.
  1. Go to yoursite.com/admin/settings/launchpad
    1. Verify server is set to production
    1. If you need your trust root added to Launchpad:
      1. Ensure this is the location you will keep your site at
      1. Ask a question in [[ https://answers.launchpad.net/launchpad | Launchpad ]]
  1. Go to yoursite.com/admin/settings/openid_teams
    1. If you have a Launchpad team, you can add it here and assign it to and existing role
  1. Go to yoursite.com/admin/user/settings
    1. Under "Launchpad user options"
      1. These settings are pretty self explanatory. Ask in channel if you don't understand them.
    1. Under "User registration settings"
      1. We recommend using "Visitors can create accounts and no administrator approval is required."
      1. If your trust root is verified, there's no need for the "Require e-mail verification [...]" setting
      1. If your trust root is not verified, you should use the "Require e-mail verification [...]" setting


= Using The Modules =

  1. Log out of the site
  1. Click the Launchpad Login button
  1. You will be transferred to Launchpad
    1. Sign in here
  1. IF your trust root IS NOT verified, you will need to provide an email address
  1. Your account will be created and you will be logged in
    1. Your Launchpad ID will be used as the user name of the account
    1. Your primary Launchpad email will be used
This section use to describe how to setup each module. However, the number of modules we manage has become too large. We've pushed for simplicity and hope that configuring these modules will be inherently easy. If it's not, please come yell at us and let us know how we can make things easier.

Basic Assumptions

  • This guide assumes you:
  • Are not scared of CLI (and using bash)
  • Will be using Drupal 6.x
  • Have a little experience with websites
  • Will be using /var/www for your source
  • Will be using yoursite.com to refer to your site
  • Were not offended here (we did say basic)

Drupal Installation

  1. Grab the latest release from http://www.drupal.org

  2. Unpack to /var/www/drupal6
    1. If you install Drupal through the repositories the directory will be different
  3. Create an Apache configuration
    1. vim /etc/apache2/sites-available/drupal6
  4. Enable the configuration
    1. a2ensite drupal6
  5. Restart Apache
    1. /etc/init.d/apache2 restart

Sample Configuration:

## This is a basic config; mine has some extras for security.
<VirtualHost *:80>
  DocumentRoot /var/www/drupal6

  <Directory /var/www/drupal6/>
    Options +FollowSymLinks

    ## These rewrites allow for CleanURL's
    RewriteOptions inherit
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

    AllowOverride All
    order allow,deny
    allow from all
  </Directory>
</VirtualHost>

Create Database

Create a database and database user

  • Replace $database and $pass with appropriate values

echo "CREATE DATABASE $database;" | mysql -uroot -p
echo "GRANT ALL ON $database.* TO '$database'@'localhost' IDENTIFIED BY '$pass';" | mysql -uroot -p

Create Website Files

The Ubuntu Drupal team suggests using a multisite setup)

cd /var/www/drupal6/sites
mkdir -p yoursite.com/{files,modules,themes}
cp default/default.settings.php yoursite.com/settings.php
chmod 777 yoursite.com/settings.php yoursite.com/files

Grab module/theme builds

Option 1: [Stable]

Drupal.org is used to host the stable releases of the modules/theme. You can use the following URL's to grab them. This is suggested over grabbing the development versions because you will automatically be notified of updates.

/var/www/drupal6/sites/yoursite.com/themes

/var/www/drupal6/sites/yoursite.com/modules

Option 2: [Development]

Using the development copies should just be used for development or testing purposes. Unless you have a solid reason for using the development version, it's suggested that you use the previous method.

First, you need to install bazaar:

sudo apt-get install bzr

Optional: To configure bazaar to talk to your launchpad account: Read the Contributors guide to launchpad. Then:

bzr launchpad-login YourLaunchpadID
bzr whoami "FirstName LastName <your@email.com>"

If you configured bazaar to talk with your LP account, you can run a few short bzr commands.

cd /var/www/sites/yoursite.com

## Theme
bzr branch lp:ubuntu-drupal-theme themes/ubuntu-drupal

## Ubuntu-Drupal Managed
bzr branch lp:ubuntu-drupal-header modules/header
bzr branch lp:ubuntu-drupal-sidebar modules/sidebar
bzr branch lp:ubuntu-drupal-countdown modules/countdown
bzr branch lp:ubuntu-drupal-locomap modules/locomap
bzr branch lp:ubuntu-drupal-planet modules/planet

## Canonical Managed (OpenID)
bzr branch lp:ubuntu-drupal-openid modules/openid
bzr branch lp:ubuntu-drupal-launchpad modules/openid-launchpad
bzr branch lp:ubuntu-drupal-teams modules/openid-teams

Finish Installation

  1. Go to yoursite.com
  2. Perform a standard installation
    1. "Install Drupal in Language"
    2. Enter details from "Create Database" section"
    3. Toss in standard info
    4. Click "You may now visit your new site."
  3. Clean up permissions
    1. chmod 774 /var/www/sites/yoursite.com/*

Setup Site

This section use to describe how to setup each module. However, the number of modules we manage has become too large. We've pushed for simplicity and hope that configuring these modules will be inherently easy. If it's not, please come yell at us and let us know how we can make things easier.

UbuntuDrupal/Setup/Drupal (last edited 2010-07-04 13:32:47 by 41)