How to run Joomla 1.0 on CD/DVD

In this tutorial you will learn how to create a fully working version of Joomla 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 Joomla 1.0 source code:

http://joomlacode.org/gf/project/joomla/frs/

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 Joomla files.

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

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

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

7. Open the deploy\php.ini file and edit the following directives:

display_errors = On
magic_quotes_gpc = On

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 “joomla”.

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 Joomla installation as usual:

Ignore the “Session save path Unwriteable” message, we will handle this later.

  1. Verify the Pre-installation Checks.
  2. Accept the GPL license.
  3. Specify the database connection setting:

In the Host Name you have to specify the same value you have noted down in the 8th step.

Host Name: localhost:3307
User Name: root
User Name:
Database Name: joomla

  1. Enter the name of your Joomla! Site
  2. Confirm the site URL, path, admin e-mail and file/directory chmods (insert an email address, keep the defaults values for the other fields and write down the admin password).
  3. Finish: Congratulations! Joomla! is installed.

13. Close the browser and DWebPro.

14. Open the Windows Explorer and browse to the deploy\www folder.

15. Delete the deploy\www\installation folder.

16. Open the deploy\www\configuration.php file.

In order to make Joomla perfectly working on CD/DVD we need to make some small adjustments to the Joomla configuration. Change the following configuration variables as described:

$mosConfig_host = '127.0.0.1:' . dwebpro_getvar('DWEBPRO_MYSQL_PORT');
$mosConfig_absolute_path = dirname(__FILE__);
$mosConfig_live_site = 'http://' . dwebpro_getvar('DWEBPRO_HOSTNAME')  . ':' . dwebpro_getvar('DWEBPRO_WEBSERVER_PORT') . '/';
$mosConfig_sef = '0';
$mosConfig_caching = '0';
$mosConfig_cachepath = dirname(__FILE__) . '/cache';

Then add the following row at the beginning of the PHP script (after the <?php opening tag):

ini_set('session.save_path',  dwebpro_getvar('DWEBPRO_TEMP'));

In this way, Joomla will be able to use the right settings in any PC where it will be executed.

17. Open the deploy\http.ini file.

In order to make Joomla working on CD/DVD we need to make some small adjustments to the DWebPro configuration:

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

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

The above settings tell DWebPro to open the default browser on startup (OpenUrl) with the Joomla web site (Url) and to copy the Joomla database files (CopyDataToHardDisk) on the user file system (DestinationDir). In this way Joomla will be able to read/write the database contents.

18. Let’s burn Joomla on CD/DVD.

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

19. Run Joomla from CD/DVD

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