-

Note: You are currently viewing documentation for Moodle 3.10. Up-to-date documentation for the latest stable version of Moodle may be available here: Windows 1 computer many servers.

Windows 1 computer many servers: Difference between revisions

From MoodleDocs
(Added real short way of adding moodle to localhost machine)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
This is going to be really dumb, but it works.  I keep looking for simple ways to installThis page is still sort of my working notes.  
This is going to be really dumb, but it works.  I got tired of slow refresh rates while building courses on our production webserverAs I did more testing (as the resident perpetual new user), I wanted to have different versions of Moodle on my desktop XP Proffessional OS computer that were absolutely clean installs.  


GOAL: I want to have two or more, independent versions of moodle on my desktop computer which I will call 'localhost'.  Since I am challenged mentally, it has got to be simple and hard drive space is not an issue.  I will be happy to run one version of moodle at a time, each with its own database.  
Since I am challenged mentally, it has got to be simple. Hard drive space and download time are not issuesPlus, I can live with only one local version of Moodle running at a time, after all I can open a window to demo.Moodle and/or my production site.  


This will start off as a casual description of the process. I am not a technological whiz but this worked for me.  The Shorter approach is a easy way to install Moodle on a standalone desktop with one or more drives which acts as a "localhost".  The longer approach uses different folders on a single drive to contain the different versions of Moodle.   
The Keep it Simple, is an easy way to install Moodle on a standalone desktop otherwise known as a "localhost".   


If I figure out a shorter way, I will post it here.


==Shorter approach==
==Keep It Simple Chris (KISS)==
I recently installed a second drive on my old desktop computer as a 200 gig slave.  I partitioned the new disk into 3 drives (100 gig, 50 gig & 50 gig). First time I have done that in 5 years, and it was so easy it was a little scary. Now I have 4 drives. I can run 4 flavors of Moodle.
#Download one of the [[Complete install packages for Windows]] of Moodle in its zip file
 
Don't blink, the short approach is really short.
#Download the full package of Moodle in its zip file
#Unzip it in a drive root (for example C:\)
#Unzip it in a drive root (for example C:\)
#Open up Windows Explorer
#Open up Windows Explorer
#Rename the top folder called moodle to xampplite.  
#Rename the top folder called moodle to something say Moodle_1_9.  
#*Now you should see a folder called for example C:\xampplite
#*Now you should see a folder called for example C:\Moodle_1_9
#run the file setup_xampp  
#run the file setup_xampp  
#*for example this will be found c:\xampplite\setup_ampp using Explorer
#*for example this will be found c:\Moodle_1_9\setup_ampp using Explorer
#run xampp_start or xampp_restart
#next run xampp_start or xampp_restart
#*Sometimes  you may get a warning and are asked if you want to block the apache site (don't block it).
#*Sometimes  you may get a warning and are asked if you want to block the apache site (don't block it).
#Open up your favorite web browser,
#Open up your favorite web browser,
#in the address bar type    localhost
#in the address bar type     
::localhost or 127.0.0.1
#Moodle should start its install process
#Moodle should start its install process


You can repeat this process on each drive with different or the same initial versions of Moodle.
You can repeat this process.  For example download the complete package of Moodle 2.0 .  Do all the steps above but rename the folder C:\Moodle_2_0.   
 
== Longer approach ==
Phase one: copy an existing working moodle version to another place, so it works there.
Phase two: update or create a new working moodle in the old space.
 
Better get familiar with wordpad.  I found a free php editor which I use instead of wordpad or notebookI am sure there are lots of them and this is not a recommendation, but I use PHP DESIGNER 2006 and none of its fancy features. It makes looking at a php file easier than wordpad, I use it to edit any text file but you don't need it, wordpad does the same thing.
 
3 months ago, I did the complete install for the latest and greatest 1.5.3.  I installed it with all the defaults.  I used it for 3 months. It rested in a folder called c:\moodle.
 
===Phase One:===
1.1 I made a new folder called c:\moodle15
1.2 I copied the entire contents of c:\moodle to the new folder called c:\moodle15. So once you open each folder, one looks like the other one. 
 
1.3 Next find c:\moodle15\apache\conf\httpd.conf.  Open it with wordpad. Now do a SEARCH for c:\moodle and replace it with c:\moodle15. I found are five places.  If you see something like c:\moodle\moodle  only change it to c:\moodle15\moodle .  Simple.  The most tricky part, when you save it in wordpad, save it as a text file and use the file name httpd.conf  . 
 
1.4 Next find c:\moodle15\moodle\config.php and open it with wordpad.  You will see a section like this:
 
 
$CFG->wwwroot  = 'http://127.0.0.1';
$CFG->dirroot  = 'C:\\moodle15\\moodle'; 
$CFG->dataroot  = 'C:\\moodle15\\moodledata';
$CFG->admin    = 'admin';
 
Change the c:\\moodle to C:\\moodle15 like you did before, that is what is important.
 
If you have created data leave the wwwroot IP address the same. 
 
1.5 There is a step that sometimes need to be done.
1.5.1  Using explorer, I double clicked on c:\moodle15\setup-xampp .  When it tells me it has nothing to do, fine.  If it says "You want to refresh your Xampp?" I type 1 in the DOS window.  It does it's things and straightens out it's world.   
 
1.6 Now we check it to see if it works.  I use windows explorer and find Xampp start in c:\moodle15.  Then I go to my browser and type 127.0.0.1 in my address bar, presto there is my good old Moodle 1.5.3. 
 
1.6.1  TIPS: Doesn't work, did you stop your old Xampp?  I like to create a shortcut to the  xampp_restart in my Start Menu and call it Moodle15. I don't use xampp_start. Restart closes any open servers, then starts the correct server.  I create another shortcut to the 1.6 xampp_restart which we will create later.  Finally, I put in a shortcut to one of the Xampp_stop.  It will shut down any server and close the DOS command window that warns you not to close it. Three buttons to push.     
 
1.6.2 TIPS: I also discovered that I only need one "MoodleChris" in my favorites. No need for a Moodle15 and Moodle16.  I am now in the habit of typing or using www.localhost in my browser address bar instead of the IP address. 
 
1.7 Log in as administrator, go to configuration and Variables.  Under operating system change your cookie to MoodleXV (for moodle15) so your browser does not get confused.  Cookies with numbers at the end don't seem to hold, so I used XV.
 
1.8 I also like to change my homepage so I know where I amI use the course site description block an put it up in one of the corners and merely put "My sandbox 1.5.3 version, cookie moodleXV " .  Different color schemes also are a good idea.
 
1.9 Close the Moodle window, run Xampp_stop .
 
===Phase Two:===
 
2.1 Do a quality control check. Go to c:\moodle and start the Xampp there and see if your browser can find the old home page.  Yes? good. 
 
2.2 Now you are ready to change to a different version.  There is two ways.  You can delete c:\moodle and do a complete new install of moodle. The second way, I wanted to go from 1.5.3 to 1.6 so I decided to download the latest standard version (way smaller file). Being lazy I made sure that when I unzipped the standard version, my unzipping program was set to replace all files and create folders if it needed to. 
 
For your info, this basically changed c:\moodle\moodle and what ever was in it. 
 
2.3  Started up Xampp, in my browser type in 127.0.0.1. Moodle knows something is different and is going to reconfigure files and change settings.  Let it do what ever and follow its instruction.  After 5 to 30 minutes is will be done.  Things will look a little different. You should be able to go into a course and maybe into a lesson.  There you will definately see things have changed.   
 
I would change the cookie as you did before (1.6), this time I would call it moodleXVI.  I would also make the homepage look different as I suggested before (1.7). 
 
2.4 Since you have the conversion process fresh in your mind.  I would repeat the process you did with moodle15, that was 1.1 through 1.7 . This time everything is going to be Moodle 16 and I left the same default IP.
 
2.5 After you have made sure your c:\moodle16 install works, delete c:\moodleYou don't need it it is taking up space.   
 
Now you have one computer, 2 servers and each server runs its own moodle.  The good thing and the bad thing is that you can only run one version of moodle at a time.  See my tips and tricks. 
----[[User:chris collman 2|chris collman 2]] 21:07, 29 April 2006 (WST)


Want to upgrade the Moodle in the folder with 1_9?  Easy, just download a [[Standard Moodle distribution]] package, unzip it so you extract to the folder Moodle_1_9.  You will want to make sure you copy all files, so you replace all the existing files in Moodle_1_9\moodle downward.


==Tips and tricks==
==Tips and tricks==
#Tip: you can only run one version of moodle at a time.  Start each version using the xampp_start or xampp_restart from the right drive.   
#'''Tip:''' With this method, you can only run one version of Moodle at a time.  Start each version using the xampp_start or xampp_restart from the right drive.   
#* Why xampp_restart?  Saves using xampp_stop, which must be done if you are switching moodles
#* Why xampp_restart?  Saves using xampp_stop, which must be done if you are switching moodles
#Tip:I make a short cut to my 3 different xampp_restart program, rename the short cut to say something like Moodle162clean, Moodle162AL, Moodle17clean and MoodleProduction.  I put those shortcuts on my start menu.   
#'''Tip:''' I make a short cut to my 3 different xampp_restart program, rename the short cut to say something like Moodle17clean, Moodle18AL, Moodle19beta and MoodleProduction.  I put those shortcuts on my start menu.   
#Tip:One of "My Favorites" web places is called "localhost".
#'''Tip:''' One of "My Favorites" web places is called "localhost".
#*Mozilla Firefox (newer versions of IE may do this) allows me to create bookmarks. I have one called LocalHost and another points to our real production Moodle site on the web.  
#*Mozilla Firefox (newer versions of IE may do this) allows me to create bookmarks. I have one called LocalHost and another points to our real production Moodle site on the web.  
#*Mozilla Firefox (newer versions of IE may do this) allow me to create seperate tabs. I will have one tab open to my production Moodle, another one to a localhost and probably a 3rd to MoodleDocs.
#*Mozilla Firefox (newer versions of IE may do this) allow me to create seperate tabs. I will have one tab open to my production Moodle, another one to a localhost and probably a 3rd to MoodleDocs.
#'''Tip:''' [[User:chris collman/TestingProcess |I test 3rd party]] add ons and hacks every now and then.  If I think I will get into trouble after installing the test feature, I first:
#*I create a clean install in folder (for example Moodle18_Certificate).
#*I upload and restore a simple course with 20 fictional participants which I have backed up and downloaded for this purpose.
#*Then I zip or rar archive the Moodle18_Certificate folder with the one course.
#*After I discover I made a mistake with the 3rd party module,
#*I rename the folder Moodle18_Certificate to Moodle_junk1.  Then I unpack my Moodle18_Certificate zip.  Deleting a Moodle install takes a while, so I rename and delete it later when I am having a cuppa.   
#'''Tip:''' I like my Moodles to be the higher level directories, and all start with Moodle something. 
#'''Tip:''' I like to use different themes for each of my Moodles, or at least make sure the site name lets me know which version I am using.
#'''Trick:''' It is possible to reach different web servers on the same machine at the same time.  But it is not simple. The big picture is to have Apache look for a different IP than the default.  This means editing ../apache/conf/httpd.config .  I like the 1 at a time method so I do not get confused.
==Summary ==
Like I said, this is dumb and there are probably easier ways than the shorter approach.  But it gives absolute seperation of different versions, which developers have grown to trust <big grin>. And I can set up a Moodle in under 10 minutes from the time I click on the download complete install package. --[[User:chris collman|chris collman]] 14:49, 21 March 2007 (CDT)
==See Also==
[[User:chris_collman/TestingProcess|Chris's test process]]


Like I said, dumb and there are probably easier ways than the shorter approach.  But it give absolute seperation.
[[Complete_install_packages]]

Latest revision as of 17:25, 20 May 2009

This is going to be really dumb, but it works. I got tired of slow refresh rates while building courses on our production webserver. As I did more testing (as the resident perpetual new user), I wanted to have different versions of Moodle on my desktop XP Proffessional OS computer that were absolutely clean installs.

Since I am challenged mentally, it has got to be simple. Hard drive space and download time are not issues. Plus, I can live with only one local version of Moodle running at a time, after all I can open a window to demo.Moodle and/or my production site.

The Keep it Simple, is an easy way to install Moodle on a standalone desktop otherwise known as a "localhost".


Keep It Simple Chris (KISS)

  1. Download one of the Complete install packages for Windows of Moodle in its zip file
  2. Unzip it in a drive root (for example C:\)
  3. Open up Windows Explorer
  4. Rename the top folder called moodle to something say Moodle_1_9.
    • Now you should see a folder called for example C:\Moodle_1_9
  5. run the file setup_xampp
    • for example this will be found c:\Moodle_1_9\setup_ampp using Explorer
  6. next run xampp_start or xampp_restart
    • Sometimes you may get a warning and are asked if you want to block the apache site (don't block it).
  7. Open up your favorite web browser,
  8. in the address bar type
localhost or 127.0.0.1
  1. Moodle should start its install process

You can repeat this process. For example download the complete package of Moodle 2.0 . Do all the steps above but rename the folder C:\Moodle_2_0.

Want to upgrade the Moodle in the folder with 1_9? Easy, just download a Standard Moodle distribution package, unzip it so you extract to the folder Moodle_1_9. You will want to make sure you copy all files, so you replace all the existing files in Moodle_1_9\moodle downward.

Tips and tricks

  1. Tip: With this method, you can only run one version of Moodle at a time. Start each version using the xampp_start or xampp_restart from the right drive.
    • Why xampp_restart? Saves using xampp_stop, which must be done if you are switching moodles
  2. Tip: I make a short cut to my 3 different xampp_restart program, rename the short cut to say something like Moodle17clean, Moodle18AL, Moodle19beta and MoodleProduction. I put those shortcuts on my start menu.
  3. Tip: One of "My Favorites" web places is called "localhost".
    • Mozilla Firefox (newer versions of IE may do this) allows me to create bookmarks. I have one called LocalHost and another points to our real production Moodle site on the web.
    • Mozilla Firefox (newer versions of IE may do this) allow me to create seperate tabs. I will have one tab open to my production Moodle, another one to a localhost and probably a 3rd to MoodleDocs.
  4. Tip: Chris collman/TestingProcess add ons and hacks every now and then. If I think I will get into trouble after installing the test feature, I first:
    • I create a clean install in folder (for example Moodle18_Certificate).
    • I upload and restore a simple course with 20 fictional participants which I have backed up and downloaded for this purpose.
    • Then I zip or rar archive the Moodle18_Certificate folder with the one course.
    • After I discover I made a mistake with the 3rd party module,
    • I rename the folder Moodle18_Certificate to Moodle_junk1. Then I unpack my Moodle18_Certificate zip. Deleting a Moodle install takes a while, so I rename and delete it later when I am having a cuppa.
  5. Tip: I like my Moodles to be the higher level directories, and all start with Moodle something.
  6. Tip: I like to use different themes for each of my Moodles, or at least make sure the site name lets me know which version I am using.
  7. Trick: It is possible to reach different web servers on the same machine at the same time. But it is not simple. The big picture is to have Apache look for a different IP than the default. This means editing ../apache/conf/httpd.config . I like the 1 at a time method so I do not get confused.

Summary

Like I said, this is dumb and there are probably easier ways than the shorter approach. But it gives absolute seperation of different versions, which developers have grown to trust . And I can set up a Moodle in under 10 minutes from the time I click on the download complete install package. --Chris collman 14:49, 21 March 2007 (CDT)

See Also

Chris collman/TestingProcess

Complete_install_packages