How to Install Drupal on a GoGrid Cloud Server in Less than 15 Minutes

August 1st, 2008 by - 29,557 views

drupal_logo

NOTE: We are currently revising this article. Please bear with us as we modify the content below for improvement.

Content Management Systems (CMS’s) are all the rage these days because of their unique ability to manage and deliver so many different types of media. The ability to create community-based websites with permission-based access and the ability to dynamically deliver different media formats and content can allow users to easily develop websites, online communities or internal intranets in a matter of minutes. Drupal, winner of dozens of open-source application awards, is one of the best and most popular Content Management Systems available today. The basic installation allows users to create online blogs, forums, wikis, books and newsletters, all of which can be privately managed by individuals or groups depending on how you set up the available permissions levels.

Of course, Drupal installs are fully supported on GoGrid. So, before you jump in and install Drupal, be sure that you have a GoGrid account set up. If you simply want to give Drupal a try within a Cloud Hosting environment, then with a new GoGrid account, you could create a GoGrid server in a few minutes and then spend the rest of your time (after the 15 minutes of setup) getting to know Drupal. Once you get your Drupal install dialed in, you might want to keep it so GoGrid makes it easy with pay-as-you-go billing and volume pricing as well. If you just wanted to test out your install skills and simply play around with Drupal on GoGrid, you can delete your cloud server(s) and use GoGrid for something else. It’s your call.

To start, simply deploy a GoGrid server through the http://my.gogrid.com customer portal. In this example, we’ll use a RHEL 4.5-based LAMP stack since it has all the software packages needed for a Drupal installation already installed.

  1. Click on the “+” button once you’ve logged in, then select “Web/App Server”. Enter a friendly name for your server, such as “Drupal” or the domain name you’ll use once your server is configured. Enter a quick description of the server and select an IP address (our new IP suggest function will suggest one automatically for you). If you already have a GoGrid server instance that runs your website and you want to install Drupal in a sub-directory or sub-domain, skip down to the second half of this article.
  2. Next, select the operating system to run your Drupal installation on. Drupal can run on either Windows or Linux machines, but in this example we’ll use a Linux-based RHEL 4.5 server image. Please note that Drupal will not run on MSSQL, so using a Linux-based distribution is easier to manage out of the box. If you wish to run Drupal on a Windows server, you will have to manually install PHP 4 or 5 with MySQL or PostgreSQL to run alongside IIS.
  3. Select the amount of RAM dedicated to your server. Depending on the amount of traffic you’re expecting, you may want to allocate a good amount of RAM to your server. I’m choosing to go with a 1GB server.
  4. Select the server image you want to deploy. In this case, I’ll be using a LAMP stack. (For Windows servers, you may want to select a Windows 2003-based operating systems with IIS and MSSQL Express installed on the server image, then install PHP and MySQL or PostgreSQL.)
  5. Click on “Save” and your server will be deployed within a matter of minutes.
  6. Once your server’s light turns green, click on the new Drupal server and then select the “Passwords” button at the left. This will take you to the login information for your server.

Now that a server has been deployed, you can go ahead and connect to it remotely via SSH. If you work on a Windows machine, you can download the PuTTY client to connect to a Linux Server. If you’re on a Mac or a Linux machine, you can open your terminal and SSH directly to the IP address of the new GoGrid server.

  1. SSH to the new server and log in using the username and password credentials located on the “Passwords” page in the GoGrid portal. In my examples, I will use the IP address 208.113.93.249. Replace this IP address throughout this document with the IP of the server you just deployed:
    ssh 208.113.93.249

    Enter your username and password to log in.

  2. Navigate to the folder where you want the Drupal installation to live. In a Linux server, this is usually in /var/www/html. If you want to install this as a subdirectory of your website, create the directory and change directories to that folder (/var/www/html/your.subdirectory).
    cd /var/www/html
  3. Now you need to download the Drupal package from drupal.org:
    wget http://ftp.drupal.org/files/projects/drupal-6.3.tar.gz
  4. Once the package has finished installing, you’ll need to un-archive it:
    tar -xzf drupal-6.3.tar.gz
  5. A new directory called “drupal-6.3” should appear when you enter the command ls to show the contents of your current directory. Now we’ll need to create the MySQL database associated with Drupal. Enter the MySQL prompt and create a new database and user for the Drupal installation. Note that you should create more securely named username, password and databases than I have below. These are just examples:
    mysql -u drupaladmin -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 21
    Server version: 5.0.58 Source distribution
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    mysql> CREATE DATABASE drupal;
    Query OK, 1 row affected (0.00 sec)
    mysql> GRANT ALL PRIVILEGES ON drupal.* TO "drupaladmin"@"localhost"
    -> IDENTIFIED BY "abcd1234";
    Query OK, 0 rows affected (0.00 sec)
    mysql> FLUSH PRIVILEGES;
    Query OK, 0 rows affected (0.01 sec)
    mysql> EXIT
    Bye
  6. You will need to modify a few files on the standard Drupal installation before proceeding with the installation. Change directories to the /sites/default directory from the root Drupal installation:
    cd sites/default/

    Now create a copy of the default.settings.php file to settings.php:

    cp default.settings.php settings.php

    Modify the file so that it is writeable from the Drupal installation:

    chmod 766 settings.php

    Create a directory called files and modify it so that it is writeable by the Drupal installation:

    mkdir files
    chmod 766 files/
  7. Now, the rest is quite simple. Open a web browser and navigate to the directory where you installed Drupal. In this example, the directory is in the root web directory, so all I have to do is navigate to my IP address (or host name if DNS records have been properly set up), and presto! The install page should appear. If it does not appear, append the URL with /install.php.
  8. Follow the on-screen instructions by selecting your language and entering your database credentials. After clicking on “Save and Continue”, you should see a progress bar for only a few moments before being brought to the following screen:
    drupal_admin2
  9. At this point, you will need to change the permissions on the files directory and on settings.php so that they are not writeable any more. You may also want to delete the file default.settings.php or move it out of your web directory entirely for security reasons:
    chmod 644 settings.php
    chmod 644 files/
    rm –rf default.settings.php

    Also make sure to move or rename the install.php file in the root Drupal installation directory. Refresh the page and all the red warning box will turn to green.

  10. Click “Save and Continue” and you will be brought to the site configuration screen. Here you can enter the name of your website and create your admin user account. Be sure to pick a secure password with at least one number, one upper-case letter and at least 7 characters long. Random passwords are always the most secure and there are several random password generators all over the web. Configure you time and date settings and follow the remainder of the on-screen instructions before hitting “Save and Continue”. It may take a few minutes for the installation to complete, so be sure not to refresh during the installation process.

That’s it! You should be brought to the welcome page where you can click on links to the admin page or online docs. You can login and start posting content immediately. Download, modify and design your own skins (Drupal even has a skin API!), add extensions and plugins from http://drupal.org and setup users and permissions. There are literally hundreds of extensions and plugins you can install to host MP3’s, Flash movies or anything else imaginable.

Drupal is one of the best community portals available and is a great PHP-based option for beginners to get their hands dirty in PHP. The user-interface is intuitive and robust, allowing admins to set up user-roles and permissions for nearly every function that can be performed by the software. This is especially useful as a company intranet or as a community page for your customers to access support materials. And installing on a GoGrid Cloud server allows you to simply delete your server if you make a mistake and start over within minutes or just give Drupal a test run.

Also be sure to check out our “How to Install WordPress on a GoGrid Server in Less Than 10 Minutes” and “How to Install phpBB on a GoGrid Cloud Server in Less Than 10 Minutes“. You could have a Drupal CMS, a WordPress Blog and a phpBB forum up and running in less than an hour!

10 Responses to “How to Install Drupal on a GoGrid Cloud Server in Less than 15 Minutes”

  1. Swapnil says:

    Guys,

    You should write a similar article for Symfony Framework. Symfony is the hottest framework right now…

    Cheers,
    Swapnil.

  2. Don Worthley says:

    I was surprised to see this article about Drupal before an article about DotNetNuke which is the premier open source CMS based on the ASP.NET framework. DotNetNuke has made significant improvements in the installation process over the past year. You can have DotNetNuke up and running in less than 5 minutes and the size of the community along with the maturity of the product ensure that it will be a great investment for the long run.

  3. John says:

    Don,

    Have you installed DNN on GoGrid? I am considering this move and would need some direction. Please post to this article if you would be willing to discuss your experience.

    Thanks,

    John

  4. [...] How to Install Drupal on a GoGrid Cloud Server in Less than 15 Minutes | GoGrid Blog [...]

  5. Ryan says:

    Brian, do you have any article updates for this post? I am trying to setup Drupal on a Go Grid server and I have limited linux and mysql experience, however I have enough knowledge to understand and follow directions. I am trying to setup drupal v5.10 as that is compatible with ubercart.

    I am having trouble in setting up the mysql account as the root won't let me create a new DB.

    • Blevine says:

      @Ryan,

      On install, there is no root password for the database. You should login to MySQL by running the command: mysql from the command line. Hit Enter when it asks for a password. Once you've done that, follow the instructions above on creating a database and assigning a user to the database. You will also want to immediately set up a password for the root user on your database. Here is a link on general security practices from MySQL: http://dev.mysql.com/doc/refman/5.0/en/security-g

      Please let us know if you have any other problems setting up your db for Drupal.

      Thanks,

      Bryan

  6. John says:

    I am getting the error:
    ******************************************
    PHP MySQL support not enabled
    We were unable to use the MySQL database because the MySQL extension for PHP is not installed. Check your PHP.ini to see how you can enable it.

    For more help, see the Installation and upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider.
    ******************************************

    I have a database set up and permissions set, but I never even get that far, this is the first page I see when I hit the Drupal site.

    Drupal 5.16
    CentOs 5.1

    • Bryan Levine says:

      You will need to do one of two things:

      1. Run the following command: yum install php-mysql
      2. Edit your php.ini file to un-comment the following lines:
      extension=mysql.so
      extension=mysqli.so

      Let us know if that works for you.

      Thanks!

      -Bryan

  7. Blevine says:

    You will need to do one of two things:

    1. Enter the command:
    yum install php-mysql

    2. Edit your php.ini file and un-comment the following lines:
    extension=mysql.so
    extension=mysqli.so

    Let us know how that works for you.

    Thanks!

    -Bryan

  8. Blevine says:

    @Anil,

    The instructions you linked above are for using Webmin, although it shouldn't make much difference. You can create a new user and/or group to own the files in your web directory. In fact, that is preferable. When doing so, you need to ensure that you update the httpd.conf file to reflect your changed ownerships for the "User" and "Group" values. That may be the error you're running into. Let me know if that works.

    Thanks,

    Bryan

Leave a reply