Installing Modules on Your VPS

Richard Eriksson - July 10, 2006 - 10:28

These instructions describe the best practice for installing modules from the Drupal contributions repository using CVS. It assumes some knowledge of the command line, but all the commands are listed below, though you will have to replace some of it with information specific to your VPS.

Finding Out the Latest Release of a Module

Go to the Drupal module's project page. For example, the CAPTCHA module, which adds a test humans need to fill out before submitting a form, is available at http://drupal.org/project/captcha. Each module will have official and/or developmental releases. Click on the version number, and you will get a tag listed there. For example, the 3.1 release of the CAPTCHA module compatible with Drupal 5 is DRUPAL-5--3-1. Use the tag you find on the release page for when you check out the module using CVS (see below).

Some modules may require other modules to function. Make sure you have those required modules installed as well.

Using CVS and Symbolic Links to Install Modules on Your Server

  1. login to your VPS via SSH
    • If you use Windows, we recommend the Putty SSH client
    • for the Mac, you should already have an application called "Terminal" or you can download the open source alternative iTerm.
    • The SSH host is the IP of your VPS, and your login is 'admin' plus the password provided to you when you received your server. See our instructions on logging in using SSH.
  2. sudo su
    • This will grant you full access to your server. You'll probably have to type your password.
  3. cd /var/www/modules
    • This will put you in your website's directory (technically the directory just above it).
  4. cvs -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib co -d modulename -r DRUPAL-5 contributions/modules/modulename
    • Important! Use the method above to determine which tag to use. If the module release has the tag DRUPAL-5--3-1, that's what you would use instead of just DRUPAL-5. Also replace modulename with the name of the module you are downloading. This is the name, lowercase and without spaces, of the module you are trying to download. If you can't seem to be able to download a module using this template, take a look at http://cvs.drupal.org/viewcvs/drupal/contributions/modules/ and determine the name of the module.
  5. cd /var/www/html/sites/yourdomain.com/modules
  6. ln -s ../../../../modules/modulename .
    • this is an important step which makes it so that the module will show up in your site's module list. If /var/www/html/sites/yourdomain.com/modules/ doesn't exist, try /var/www/html/sites/default/modules/ instead.
  7. visit your site, login with your administrator credentials, and enable the module by clicking Administer » Site building » Modules (in 4.7 it's just administer » modules).
Creative Commons License

This work is licensed under a Creative Commons Attribution-Share Alike 2.5 License. This license applies to all text written by Bryght. All others retain full copyright to their text.