Drupal

Differences between revisions 10 and 11
Revision 10 as of 2009-03-17 15:07:29
Size: 5160
Editor: 138
Comment:
Revision 11 as of 2009-03-18 16:23:54
Size: 5311
Editor: 138
Comment:
Deletions are marked like this. Additions are marked like this.
Line 22: Line 22:
  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 29:
= Create Website = = Create Website Files =
Line 29: Line 31:
  1. Create website files (The Ubuntu Drupal team suggests using a multisite setup)
    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.launchpad.net/~ubuntu-drupal-modules/ubuntu-drupal-openid/6.x modules/openid
      1. bzr branch https://code.launchpad.net/~ubuntu-drupal-modules/ubuntu-drupal-launchpad/6.x modules/openid_launchpad
      1. bzr branch https://code.launchpad.net/~ubuntu-drupal-modules/ubuntu-drupal-teams/6.x modules/openid_teams
      1. bzr branch https://code.launchpad.net/~ubuntu-drupal-modules/drupal-planet/6.x modules/planet
      1. bzr branch https://code.launchpad.net/~ubuntu-drupal-themes/ubuntu-drupal-theme/6.x themes/ubuntu-drupal
    If you DO have a launchpad account (preferred):
      1. bzr launchpad-login
      1. bzr branch lp:ubuntu-drupal-openid modules/openid
      1. bzr branch lp:ubuntu-drupal-launchpad modules/openid_launchpad
      1. bzr branch lp:ubuntu-drupal-teams modules/openid_teams
      1. bzr branch lp:drupal-planet modules/planet
      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/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 =

'''Note:''' To configure bazaar for the latest source:
{{{
sudo apt-get install bazaar
bzr launchpad-login YourLaunchpadID
bzr whoami "FirstName LastName <[email protected]>"
}}}

Option 1: [Stable] Go to the [[ https://launchpad.net/ubuntu-drupal-releases | Ubuntu-Drupal LP Releases ]] page and grab the latest package.

Option 2: [Latest] If you configured bazaar to talk with your LP account, you can run a few short bzr commands.
{{{
cd /var/www/sites/yoursite.com
bzr branch lp:ubuntu-drupal-openid modules/openid-amodified
bzr branch lp:ubuntu-drupal-launchpad modules/openid-launchpad
bzr branch lp:ubuntu-drupal-teams modules/openid-teams
bzr branch lp:drupal-planet modules/planet
bzr branch lp:ubuntu-drupal-theme themes/ubuntu-drupal
}}}

Option 3: [Latest Slower] If you haven't configured bazaar to talk with your LP account, you can still use bazaar, but a longer method.
{{{
cd /var/www/sites/yoursite.com
bzr branch https://code.launchpad.net/~ubuntu-drupal-modules/ubuntu-drupal-openid/6.x modules/openid-amodified
bzr branch https://code.launchpad.net/~ubuntu-drupal-modules/ubuntu-drupal-launchpad/6.x modules/openid-launchpad
bzr branch https://code.launchpad.net/~ubuntu-drupal-modules/ubuntu-drupal-teams/6.x modules/openid-teams
bzr branch https://code.launchpad.net/~ubuntu-drupal-modules/drupal-planet/6.x modules/planet
bzr branch https://code.launchpad.net/~ubuntu-drupal-themes/ubuntu-drupal-theme/6.x themes/ubuntu-drupal
}}}

= Loopback =

Create entry in hosts file for loopback
{{{
echo "127.0.0.1 yoursite.com" >> /etc/hosts
}}}
Line 82: Line 107:
    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. If you need your trust root added to Launchpad please read our [[ UbuntuDrupal/FAQ | FAQ ]].

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 inside /var/www (Move everything outside the drupal directory)

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/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

Note: To configure bazaar for the latest source:

sudo apt-get install bazaar
bzr launchpad-login YourLaunchpadID
bzr whoami "FirstName LastName <[email protected]>"

Option 1: [Stable] Go to the Ubuntu-Drupal LP Releases page and grab the latest package.

Option 2: [Latest] If you configured bazaar to talk with your LP account, you can run a few short bzr commands.

cd /var/www/sites/yoursite.com
bzr branch lp:ubuntu-drupal-openid modules/openid-amodified
bzr branch lp:ubuntu-drupal-launchpad modules/openid-launchpad
bzr branch lp:ubuntu-drupal-teams modules/openid-teams
bzr branch lp:drupal-planet modules/planet
bzr branch lp:ubuntu-drupal-theme themes/ubuntu-drupal

Option 3: [Latest Slower] If you haven't configured bazaar to talk with your LP account, you can still use bazaar, but a longer method.

cd /var/www/sites/yoursite.com
bzr branch https://code.launchpad.net/~ubuntu-drupal-modules/ubuntu-drupal-openid/6.x modules/openid-amodified
bzr branch https://code.launchpad.net/~ubuntu-drupal-modules/ubuntu-drupal-launchpad/6.x modules/openid-launchpad
bzr branch https://code.launchpad.net/~ubuntu-drupal-modules/ubuntu-drupal-teams/6.x modules/openid-teams
bzr branch https://code.launchpad.net/~ubuntu-drupal-modules/drupal-planet/6.x modules/planet
bzr branch https://code.launchpad.net/~ubuntu-drupal-themes/ubuntu-drupal-theme/6.x themes/ubuntu-drupal

Loopback

Create entry in hosts file for loopback

echo "127.0.0.1       yoursite.com" >> /etc/hosts

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

  1. Go to yoursite.com/admin/build/modules
    1. Enable "OpenID" in "Core - optional" section
    2. Enable "Launchpad OpenID" in "Other" section
    3. Enable "OpenID Teams" in "Other" section
    4. Enable "Planet" in "Community" section
    5. Click "Save Configuration"
  2. Go to yoursite.com/admin/build/themes
    1. Select "Ubuntu-Loco" theme
    2. Click "Save Configuration"
  3. Go to admin/build/blocks
    1. Move the "Launchpad Login Button" underneath the "User Login" block.
    2. Disable to login block (after testing)
    3. I usually set the "Block title" to "<none>"

    NOTE: Defaults past this point should be acceptable.

  4. Go to yoursite.com/admin/settings/launchpad
    1. Verify server is set to production
    2. If you need your trust root added to Launchpad please read our FAQ.

  5. 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
  6. 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.
    2. Under "User registration settings"
      1. The Ubuntu Drupal team recommends using "Visitors can create accounts and no administrator approval is required."
      2. If your trust root is verified, there's no need for the "Require e-mail verification [...]" setting
      3. 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
  2. Click the Launchpad Login button
  3. You will be transferred to Launchpad
    1. Sign in here
  4. IF your trust root IS NOT verified, you will need to provide an email address
  5. 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
    2. Your primary Launchpad email will be used

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