I wrote down this set-up as I want to burn sites to CD for distribution and Server2Go is a free way of doing that. I haven’t actually tried the CD-burning part yet, but this is how to use Server2Go to set up a Drupal site locally for building/testing. Once the site is ready, should be just a few settings changes to get it working on a read-only CD, but that’s another story. If you’ve already done that, then add some feedback!
->1. Download server2go from:
(I used the mini package with the 2.0.61 version of Apache. Note that I couldn’t get it working with the package that had the latest version of Apache)
->2. Unzip where you want it. The folder will be called ‘server2go_a2_psm_mini’ or something similar if you downloaded a different package. Check it’s working by double clicking the Server2Go.exe file. You should get the splash screen saying “congratulations….” opening up in Internet Explorer.
->3. If you want, you can use the Portable Apps version of Firefox to be the browser (useful for when burning on to a CD later). To do this see this link:
NOTE: I couldn’t get this to work with version 3 of Firefox Portable. Instead use version 126.96.36.199 which you can download here:
This will involve making a couple more changes to pms_config.ini. Check it works again once you’ve made the changes by launching Server2Go.exe.
->4. Change the following settings in the pms_config.ini file in the main folder (use a program like Notepad++ to change it):
a) [line 21] StartLocal=1 (this is for using when you want to develop the website and have to write files. If you want to user server2go to run off a read-only CD at a later point, you will have to change it back to =0)
b) [line 33] Hostname=localhost
c) [line 69] LocalMirror=0 this is so that the things you do to build your site are saved rather than carried out in a temporary folder
d) [line 80] Make a note of this value: ‘MySQLPort=7188’ we need it later.
->5. Make the following changes to make sure Apache has the right settings to run Drupal, and can provide clean-urls:
a) change the following settings in the server\config_tpl\php.ini (this is instead of changing them in the apache file):
[line 201] max_execution_time = 60 (instead of 30)
[line 202] memory_limit = 64M (instead of 8M)
b) change the following setting in the server\config_tpl\httpd.conf
[line 164] Remove the ‘#’ so it reads LoadModule rewrite_module modules/mod_rewrite.so
->6. Download Drupal 6.X (latest version) and unzip it into the htdocs folder. You can unzip it so that it sits in a folder inside the htdocs folder. This means you’ll have a folder inside htdocs called ‘drupal.6.4’ or something similar. You can rename it to anything you want.
In this case, we’ll call it ‘drupal’ so all Drupal’s files will sit in ‘server2go_a2_psm_mini\htdocs\drupal’
->7. Do the things the Drupal set up will tell you to do which are:
a) create a folder called ‘files’ in the main drupal folder (i.e. ‘server2go_a2_psm_mini\htdocs\drupal\files’)
b) create a ‘modules’ folder and a ‘themes’ folder in the default folder, this is where you will place your add-on modules and themes (i.e. ‘server2go_a2_psm_mini\htdocs\drupal\sites\all\modules’ and ‘server2go_a2_psm_mini\htdocs\drupal\sites\all\themes’
c) copy the default settings file and rename it settings (i.e. copy ‘server2go_a2_psm_mini\htdocs\drupal\sites\default\default.settings.php’ and paste it in the same place but re-named just settings.php)
->8. Now we’re going to add the database that Drupal needs to run.
a) start server2go.exe in the ‘server2go_a2_psm_mini’ folder. It should open up the Server2Go start-page in a new browser (internet explorer if you didn’t do the Firefox Portable Apps adjustment in step 3)
b) go to the phpmyadmin link under ‘Tools’ on the right-hand side.
c) Click on priveleges
d) Click on ‘Add user’
e) Under username put ‘admin’ (or whatever you want to call your user); set ‘host’ as ‘local’ and set your own password (write it down!)
f) Under database for user choose ‘none’
g) Under ‘global priveleges’ click on ‘check all’
h) click on ‘Go’. You should get a message saying ‘You have added a new user’
i) Click on the databases link and you’ll see a box at the bottom of the page that says ‘create database’. Put in the name of your database. Let’s call it ‘drupal’ and press ‘create’. You should get a message saying ‘Database drupal has been created.’
j) Click on the picture of a house to go to the phpmyadmin home page. Then select the drupal database from the dropdown menu in the top left corner.
k) Click on ‘priveleges’ and check that ‘admin’ is one of the users listed as having access to the database. All done! (NOTE: READ OTHER DRUPAL HANDBOOK STUFF ABOUT SECURITY AND CREATING DATABASES. THIS IS A QUICK METHOD AND NOT NECESSARILY VERY SECURE…)
->9. Now we’re going to set up Drupal. Go to http://localhost:4001/drupal/ (orhttp://localhost:4001/whatever-you-called-the-folder-you-unzipped-drupal…) and you should see the Drupal set-up page.
a) After you’ve selected which language you are installing Drupal in, you will be asked to fill in the database details. In our case the database name is ‘drupal’; the database username is ‘admin’; and the password is whatever password you chose.
b) Click on the ‘Advanced options’. Under database port you need to put 7188, the number we wrote down from step 4.
c) save and continue.
d) follow all the rest of the stuff as in the Drupal Handbook.
e) As you’re installing on a local site, you’ll probably get this message:
warning: mail() [function.mail]: Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in php.ini
Try this: http://drupal.org/project/smtp
->10. To check everything works, add some test content to your site and then close the browser. Restart Server2Go.exe once the server has shut down. If your content is there, bingo! It works!