Using Joomla available on Demo CD
A demo of Stunnix Web Server already includes installation of Joomla. You can login to adminstrator's interface using this link using login 'admin' and password 'root' and edit configuration yourself. In case such option suits you, there is no need to read the rest of this document.
Installing your own copy of Joomla
- Start CDBuilder
- Create project input directory on your harddisk - let it be named c:\mycds\cd1\in (windows) or ( /home/YOURLOGIN/mycds/cd1/in for OSX or Linux) and project output directory - c:\mycds\cd1\out (windows) or ( /home/YOURLOGIN/mycds/cd1/out for OSX or Linux)
- Create subdirectories 'content' and 'databases' inside project input directory, that is c:\mycds\cd1\in\content and c:\mycds\cd1\in\databases (windows) or ( /home/YOURLOGIN/mycds/cd1/in/content and /home/YOURLOGIN/mycds/cd1/in/databases for OSX or Linux)
- Copy content of directory 'extensions/data' from Demo CD to subdirectory 'databases' inside your project input (so you would have directory named c:\mycds\cd1\in\databases\mysql_data on Windows or /home/YOURLOGIN/mycds/cd1/in/databases/mysql_data on OSX or Linux.
- Copy your web files to c:\mycds\cd1\in\content (windows) or /home/YOURLOGIN/mycds/cd1/in/content (OSX, Linux) - that is if you expect to have document with URL 127.0.0.1/myfile.shtml working, then you should have file with name c:\mycds\cd1\in\content\myfile.shtml (windows) or /home/YOURLOGIN/mycds/cd1/in/content/myfile.shtml (OSX, Linux).
- Suppose you wish to have Joomla be accessible using url http://127.0.0.1/cms/joomla/; in this case, create 'cms/joomla' directory inside 'content' folder and unpack Joomla there. This way you will have file LICENSE.php from toplevel joomla directory located in c:\mycds\cd1\in\content\cms\joomla\LICENSE.php (windows) or /home/YOURLOGIN/mycds/cd1/in/content/cms/joomla/LICENSE.php
- Copy 'configuration-stunnix.php' from 'site/www/root/joomla/' on the demo CD to the directory where you've unpacked your Joomla to - in your case it should go to c:\mycds\cd1\in\content\cms\joomla\configuration-stunnix.php (windows) or /home/YOURLOGIN/mycds/cd1/in/content/cms/joomla/configuration-stunnix.php. Edit it there, and set value of variable $_mosConfig_dirpath to 'cms/joomla' (i.e. $_mosConfig_dirpath= 'cms/joomla'; ), otherwise CD you'll produce won't work on other OSes or boxes.
- In order your Joomla site to appear in browser on startup of the Stunnix Web Server, go to General,Path and Initial URL and enter '/cms/joomla' for 'Default initial URL to open' field.
- In CDBuilder, click Project, New, and in "Project Input directory" entry type c:\mycds\cd1\in (windows) or /home/YOURLOGIN/mycds/cd1/in (OSX, Linux); type "../out" in "Project Output directory". Enter project title (use a long name as you wish, spaces are OK). Click OK.
- Do Project, Site settings. Click General, Main Properties. Enter 'content' as 'Directory with contents of document root', enter 'databases/mysql_data' as "Directory with MySQL database files (not sql dumps), if used"; enter 'databases/sqlite_data' as "Directory with SQLite database files, if used".
- Click Databases, Mysql. Change 'MySQL support' to 'Run from CD'.
- Click PHP, Main and select anything but 'PHP4' in topmost 'PHP support' dropdown list (CD won't work on OSX if you'll select PHP4 there).
- Edit other CD properties you find necessary (e.g. shutdown behaviour).
- Click OK to save CD properties.
- Click Make Prototype, Copy all files.
- Now you have a prototype of your CD inside c:\mycds\cd1\out (windows) or ( /home/YOURLOGIN/mycds/cd1/out for OSX or Linux)
- Go to the directory with your CD's prototype - i.e. c:\mycds\cd1\out (windows) or ( /home/YOURLOGIN/mycds/cd1/out for OSX or Linux) and start CD from there (by clicking on runcd on Windows, running 'autorun' on Linux or clicking 'Run CD on MacOS X' on OSX). Your CD will start.
- Once browser opens, a Joomla installer should start automatically.
Click next till you reach 'MySQL configuration'.
Enter '127.0.0.1' as host name, enter 'blah' as user name and password (mysql included with Stunnix Web Server is configured to ignore access control, so it doesn't matter what login/password you will type there).
Enter test as 'database name'.
Check 'drop existing tables' checkbox (to drop tables created by Joomla used in demo), configure rest of checkboxes as you like.
- Click Next. Joomla will ask site description - enter something and click Next.
- Do not alter paths on the next screen, just type admin email and password.
- Click Next, Click View Site. Then rename directory named 'installation' inside c:\mycds\cd1\out\site\www\root\cms\joomla (windows) or /home/YOURLOGIN/mycds/cd1/out/site/www/root/cms/joomla/ (OSX, Linux) to e.g. 'installation-was'.
- Add line include('configuration-stunnix.php'); to the bottom of file 'configuration.php' located in c:\mycds\cd1\out\site\www\root\cms\joomla (windows) or /home/YOURLOGIN/mycds/cd1/out/site/www/root/cms/joomla/ (OSX, Linux) (otherwise CD won't work on other computers).
- Use Joomla. Install your Joomla packages, templates and bots.
- Consider adding link for stopping CD to all pages on your site - it should have a destination of "/stop-the-server/helper-stop-httpd.exe" (in case you are running Stunnix ADVANCED Web Server) or "/spws-terminate-and-release-cd.html" (if running Stunnix PERL Web Server); you will also have to create a file "/spws-terminate-and-release-cd.html" in your project's output directory and put something like "goodbye, thank you for using our disk or product" message there (or put a redirect to other page there). This means that you should create and fill a file c:\mycds\cd1\out\site\www\root\spws-terminate-and-release-cd.html (windows) or /home/YOURLOGIN/mycds/cd1/out/site/www/root/spws-terminate-and-release-cd.html (OSX, Linux) - like one present on Demo CD.
Also the problem is that if you will decide to alter any setting in CDBuilder and rebuild your CD (e.g. change browser properties, alter location of logo file or edit the set of supported operating systems), all your changes you've made to database (installing sample data, installation of bots, packages and templates) and changes to files (configuration-stunnix.php, configuration.php) will be lost. So you will have to "backport" all your changes to your "project input directory". Of course it's better to backport everything once you've finished installing all Joomla packages, templates and so on.
To do this, you will have to stop Stunnix web server and MySQL server first that run your Joomla-based site.
Stage 2 - backporting changes back to input directory
- Stop the mysql server and web server by opening URL "/stop-the-server/helper-stop-httpd.exe" (in case you are running Stunnix ADVANCED Web Server) or "/spws-terminate-and-release-cd.html" (if running Stunnix PERL Web Server) - just see copy the URL of any Joomla page (e.g. http://127.0.0.1:9001/cms/joomla/ ) and enter URL http://127.0.0.1:9001/stop-the-server/helper-stop-httpd.exe (in case of Stunnix ADVANCED Web Server) or http://127.0.0.1:9001/spws-terminate-and-release-cd.html (in case of Stunnix PERL Web Server). Wait for 30 seconds after visiting that URL.
- It's wise to backup your project output directory - i.e. c:\mycds\cd1\out (windows) or /home/YOURLOGIN/mycds/cd1/out/ (OSX, Linux).
- Clear web content directory in project INPUT directory, that is c:\mycds\cd1\in\content (windows) or /home/YOURLOGIN/mycds/cd1/in/content (OSX, Linux). Copy web content from c:\mycds\cd1\out\site\www\root\ (windows) or /home/YOURLOGIN/mycds/cd1/out/site/www/root/ (OSX, Linux) to project's input web content directory: c:\mycds\cd1\in\content\ (windows) or /home/YOURLOGIN/mycds/cd1/in/content/ (OSX, Linux).
- Clear database files in project INPUT directory c:\mycds\cd1\in\databases (windows) or /home/YOURLOGIN/mycds/cd1/in/databases (OSX or Linux) and copy all database files from CD prototype - from c:\mycds\cd1\out\extensions\data (windows) or /home/YOURLOGIN/mycds/cd1/out/extensions/data (OSX or Linux) to directory you've just cleared.
- Go to Project, Site Settings in the CDBuilder (we assume you didn't close CDBuilder window; if you've closed it - start CDBuilder again, do Project, Open and select your project).
- Go to Project, Site Settings.
- Click Databases, Mysql. Change 'Run from CD' to ANYTHING else (since Joomla updates database tables on each pageview), e.g. 'Copy to temp directory on HDD each time' (so that all changes made by user are lost each time user runs CD).
- Change other CD settings in that dialog as you wish, click OK.
- Click 'Make prototype', 'Clear dir with prototype then copy all files'.