Category Archives: Drupal

1-Click Install of Open Atrium on Dreamhost

Summary: If it was just one click I probably wouldn’t be writing about it ;) This is really for the ADD peeps and newbs out there, there’s nothing too challenging about this install.

Here’s a quick guide to starting an Open Atrium (Drupal-based “intranet in a box”) site if you happen to be a lucky Dreamhost customer. Dreamhost just added this feature today and it is pretty slick, but there’s still a couple bits of manual configuration.

Here’s what you’ll get:
screenshot of the dashboard of a fresh Open Atrium installation

How to Install Open Atrium on Dreamhost

  1. DH Panel: Go to Domains > Manage > Add New Domain / Subdomain, and create a spot to put your Open Atrium install. For example: oa.23rdworld.com. You can make your subdomain anything you want.
  2. DH Panel: Goodies > One-Click Installs > OpenAtrium. Select your new subdomain and leave option set to ‘Automatically create database’.
  3. You will receive an automated email from Dreamhost that will include an link to your new site and information about your database that you will need later. Save this info!
  4. Set file permissions. Access your server files (FTP or shell, etc) to your new site. Just as the actually quite helpful error message says:

    # Copy the ./sites/default/default.settings.php file to ./sites/default/settings.php.
    # Change file permissions so that it is writable by the web server. If you are unsure how to grant file permissions, please consult the on-line handbook

    For you newbs, an easy way to do this is to use an FTP client (like Filezilla) to access your new site.

    • Download /sites/default/default.settings.php
    • Rename default.settings.php settings.php
    • Upload settings.php to /sites/default/
    • Right-click settings.php and select file permissions (in Filezilla, will be similar in other FTP clients) and set it to 744 (server/owner can read-write)
  5. Go to your new site, for example: oa.23rdworld.com, this is where the prompts begin. Follow them.
  6. Open Atrium installation settings.php file permission errorYou will get an error message (at right) if you skipped the ‘Set file permissions’ step (above). That’s ok, you can just go back and do that now and then click ‘Try again’.
  7. Database settings: Fill in the database settings based on the email mentioned earlier. Make sure to open the ‘Advanced options’ menu group and enter the hostname (also provided in the email).
  8. The rest of the configuration settings should be pretty obvious.

Hope this was useful for someone, I’m curious to see/hear what folks are using their Open Atrium installs for. Obviously not an intranet…unless you made it private…there’s loads of ways to do that (if there’s interest I’ll expand). I’m using mine to organize house projects with my roommate and husband. What are you using Open Atrium for?

P.s. If anyone is looking to get a new Dreamhost account I have a $100 off invitation if you’re ready to commit to two years and there’s plenty of referral codes out there too, so find one before you sign up!

Drupal 5.x on Ubuntu LAMP

The quick and dirty dev install of Drupal on Ubuntu

USE THIS INFORMATION AT YOUR OWN RISK. Any information found on this website is offered only as informational and includes no warranty, guarantees or support. The author claims no authority on any subject whatsoever.

Why Drupal, Why Ubuntu?

For me it's all about community. I've always enjoyed apache web development in part because of the active and helpful user groups, forums, irc channels, etc. I use Ubuntu as the operating system for my LAMP because it's really popular right now - it has a very active forum and pretty good documentation. Drupal is an open-source content management system, or you could look at it as a framework since it was built to make it easy for coders to override almost anything it does without hacking the core. This means you could make it do anything you want if you happen to be good enough at PHP and still take advantage of core development and security updates no matter how much you modify the product.

Why write installation instructions?

Good question? Well, the installation instructions at Drupal.org are good but they cover all sorts of environments (who wants to slog through all that?) and those in the Ubuntu Community Docs are great and pretty specific but cover Drupal 4.6.7 and 5.1. I probably should update the docs at Ubuntu, perhaps I will after I hash it out here and after a few people let me know they worked or what to change. Also, I like to search for instructions specific to my situation whenever I approach a new installation. It's good to see what other people in similar circumstances have encountered, I call it due diligence. I would suggest any user doing this install review the documentation mentioned above thoroughly. Also see related links at the end of this article.

Environment

These instructions don't cover the setup of your server environment. Mine happens to be:
  • Ubuntu 6.06 LTS server
  • Apache 2.0.5.5
  • PHP 5.1.2
  • MySQL 5.0.22

Get Drupal

wget http://ftp.drupal.org/files/projects/drupal-5.7.tar.gz
tar -zxvf drupal-5.7.tar.gz

I'm a big fan of apt-get but there were a lot of issues in the forum started by people having problems with Drupal in the repositories. Community Docs recommend getting the latest package from Drupal.org, right now that happens to be Drupal 5.7. (Drupal 6 is out now as well, and is very cool, but CCK/Views aren't ready for prime-time and I'm installing for the purposes of following tutorials written for 5.x.)

Move Drupal

sudo mkdir /var/www/drupaltest
sudo mv drupal-5.3/* drupal-5.3/.htaccess /var/www/drupaltest
sudo mkdir /var/www/drupaltest/files

My apache install is pretty much setup to default config. /var/www is my web root, yours may vary. Because I'm just using this particular install as a test which I plan on destroying later I'm going to put it in the boring old subdirectory 'drupaltest', actually I named mine d57_test_01 but thought drupaltest would be more comprehendable in the example.

In the mv command we explicitly move .htaccess because it's a hidden file.

Database Setup

mysqladmin -u root -p create db_drupaltest
mysql -u root -p

Create the database for Drupal to use - you can replace 'db_drupaltest' with whatever you'd like to call the database. You'll need to enter your mySQL root password. If you get an access denied error make sure you're using the mySQL root password and not your login or Ubuntu root password. The second command puts you in mySQL monitor, the command line interface for managing your MySQL server. The commands in the next code section are SQL. You could also run this in phpMyAdmin if you'd rather have a GUI.

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON db_drupaltest.* TO 'drupal_usr'@'localhost' IDENTIFIED BY 'secretpassword';
FLUSH PRIVILEGES; \q

Change the datebase name, the username 'drupal_usr' and 'secretpassword' to whatever you like. Just don't forget to write it down somewhere safe because you'll need to know it later.

Edit Settings.php

sudo vi /var/www/drupaltest/sites/default/settings.php

Using vi (or whatevs) change the $db_url line. Note: If you use a fancy charcters or dashes in your user, password or database names replace them URI hex encodings, this is detailed in database settings comments section in the settings.php file.

$db_url="mysql://drupal_usr:secretpassword@localhost/db_drupaltest";

Up Your PHP Memory Allocation

If you have a new LAMP install the default memory setting for scripts is 8M. This is redonkulous and Drupal will suck. Look for the 'Resource Limits' section and change memory_limit to 32M and then restart apache.

sudo vi /etc/php5/apache2/php.ini sudo /etc/init.d/apache2 restart

Final Steps

Go to http://localhost/drupaltest/install.php (or your servername instead of localhost if DNS is setup). You should see this:

Screenshot of Drupal Installation Message

One last thing, if you click Administer you will probably get a 'one or more problems were detected' error message. Two things: your files directory isn't writable and you cron job hasn't run. The first one is easy - just make the files area writable by all:

sudo chmod 777 /var/www/drupaltest/files

As for cron, you can just click 'run cron manually' on the Status report page - but you'll need to do this anytime you want to update the index. For a quick dev install you're likely to trash soon it may not be necessary but for a production or long-term dev install you'll want to set up a cron job to hit http://localhost/drupaltest/admin/logs/status/run-cron every few minutes depending upon your site's traffic and requirements. See Configuring cron jobs in Drupal's Getting Started guide for more.

That's it. Good luck folks, now enjoy surfing the Drupal learning curve...heheh.

Related Links