How to run Drupal 6.2 on CD/DVD

In this tutorial you will learn how to create a fully working version of Drupal running from a CD or DVD.

1. The first step is to download and install the DWebPro server:

http://www.dwebpro.com/download

DWebPro is a web server (like Apache and IIS) developed for distributing dynamic web site on CD/DVD and as install packages. It’s FREE for non commercial use, so you can use it for your personal projects without any cost.

2. Then you have to download and install the following additional packages (from http://www.dwebpro.com/addons):

  • PHP 5.2
  • MySQL Server 5.0
  • phpMyAdmin 2.6

When you install PHP, chose the ISAPI (recommended) mode. It’s faster than CGI, especially when the web site is executed from a CD/DVD.

The installation of both DWebPro and the preconfigured packages is pretty straight forward, just run the installer and follow the steps (Next, Next, Next, … Finish!).

3. Download the Drupal 6.2 source code

Get the Drupal source code from http://drupal.org/download.

4. Open the Windows Explorer and browse to the deploy\www folder of DWebPro (usually C:\DWebPro\deploy\www).

This folder is the DWebPro document root, where we will place the Drupal files.

5. Remove any file and folder from the deploy\www directory except the following two ones:

  • deploy\www\bin
  • deploy\www\phpMyAdmin

6. Extract the content of the Drupal package into the deploy\www folder.

7. Open the deploy\php.ini file (usually C:\DWebPro\deploy\php.ini) and enable the GD2 and mbstring extensions.

Search for the following strings:

;extension=php_gd2.dll
;extension=php_mbstring.dll

and replace them with:

extension=php_gd2.dll
extension=php_mbstring.dll

8. Start DWebPro.

You can start DWebPro using the “Start DWebPro” icon on the desktop or the on in Start -> Programs -> DWebPro

9. A this point you should see the familiar phpMyAdmin interface.

In the header of the page you should see a text like the following:

MySQL 5.0.15 running on localhost:3307 as root@localhost

Write down the port number specified after “localhost:”. You will need this value in the following steps.

10. Create a new database named “drupal”.

11. Navigate to the root

If, for instance, the address bar in your browser displays http://127.0.0.1:8080/phpMyAdmin/index.php you have to remove the phpMyAdmin/index.php and navigate to http://127.0.0.1:8080/

If, for instance, the address bar in your browser displays http://127.0.0.1:8081/phpMyAdmin/index.php you have to remove the phpMyAdmin/index.php and navigate to http://127.0.0.1:8081/

12. Execute the Drupal installation as usual:

Fill the database Database configuration:

Database name:  drupal
Database  username: root
Database  password:

Advanced  options

Database host:  127.0.0.1
Database port:  here insert the port number you have noted at point 9.
Table prefix:

Ignore the "Unable to send e-mail" warning message, we will solve it later.

Once you have completed the install process, close DWebPro.

13. Edit the deploy\www\sites\default\settings.php file as follows:

$db_url = 'mysql://root@127.0.0.1:' .  dwebpro_getvar('DWEBPRO_MYSQL_PORT') . '/drupal';
ini_set('session.save_path',  dwebpro_getvar('DWEBPRO_TEMP'));
ini_set('smtp_port',  dwebpro_getvar('DWEBPRO_SMTP_PORT'));
$conf['clean_url'] = 1;

14. Edit the deploy\http.ini file as follows:

[WebServer]
RewriteEngine.Start=1
RewriteEngine.FileName=##DWEBPRO_PATH##\rewrite.ini
RewriteEngine.ReloadOnEveryRequest=0

[Browser]
OpenUrl=1
Url=http://##DWEBPRO_HOSTNAME##:##DWEBPRO_WEBSERVER_PORT##/

[MySQL]
CopyDataToHardDisk=1
DestinationDir=##DWEBPRO_TEMP##\drupal

15. Create an empty file in the deploy folder, name it as rewrite.ini  and edit it as follows:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

16. Let’s burn Drupal on CD/DVD.

Open your favorite burning utility (es. Nero) and burn the whole deploy folder into a CD/DVD.

17. Run Drupal from CD/DVD

Start the dwebpro.exe from the CD/DVD created in the previous steps and here it is: your Drupal running from CD/DVD.