Although I prefer Linux--view the UbuntuLinux version of these notes sans videos--these days for Moodle server, running Moodle on a Windows Laptop is pretty straightforward. My notes below are immediately for that, although once you get down to Step 6-7, it's all about Moodle.
I hope this is helpful to a budding Moodle administrator out there, not just the folks in the workshop at TCEA 2012 State Conference!
XAMPP Windows Server for Moodle
Welcome! This is a short outline with video illustrations. You can access all the videos here.
Be sure to watch the MoodleMayhem intro video first!
Step 1 - Get the Software You Need (View Video Walkthrough)
- Chrome browser - http://google.com/chrome
- XAMPP (Apache, MySQL, PHP and Filezilla FTP Server) - http://www.apachefriends.org/en/xampp-windows.html
- PS Pad text editor - http://www.pspad.com/en/download.php
- phpMyAdmin - http://goo.gl/rbskS
- Moodle 2.2 - http://download.moodle.org/
- Chrome browser
- PS Pad text editor
- XAMPP - install onto D:\ if on a server or C:\ if it's your laptop or desktop computer. If in a server environment, check with your server admin for specific drive to install to. Start the Control Panel, which should put an orange box on your screen.
- Go to the hard drive (C: or D:) that you installed XAMPP on, and make a shortcut on the Desktop for the htdocs folder
- Create a folder called mdata at the same level as htdocs (not inside it)
- Unzip the Moodle 2.1.3 zip file you downloaded in Step 1 and drag the Moodle folder--you can rename this to anything, such as "sandbox"--into the htdocs folder.
- In the mdata folder, create a folder that has the same name as your Moodle folder (e.g. "sandbox")
- To modify the php.ini file, you will need to go to the XAMPP folder and then find the file.
- Open the file with PS PAD (although most text editors will do the job), and make the following changes:
- display_errors = Off
- display_startup_errors = Off
- register_globals = Off
- post_max_size = 2000M
- mysql.connect_timeout = -1
- max_execution_time = 5000
- max_input_time = 5000
- memory_limit = 2000M
- file_uploads = On
- upload_max_filesize = 2000M
- Save your changes to the php.ini file.
- One possible problem that may arise is that phpMyAdmin comes up in Dutch/German. To address that, edit the config.inc.php file in the phpMyAdmin directory and paste in:
$cfg['Lang'] = 'en-utf-8';
to ensure it always loads in English. Note: The video for Step 5 addresses the phpMyAdmin issue.
- Activate Apache by clicking the START button
- Activate MySQL by clicking the START button
- Start up Chrome browser and navigate to http://localhost on your computer. This should bring up the XAMPP language selection page. Choose English or your preferred language.
- Database creation
- While viewing the XAMPP page, click on phpmyadmin in the menu and then create a new database that will be used to house your Moodle content. For the purposes of this handout, let's call the database "sandbox"
- When you create the database, make sure to choose "utf8_general_ci" collation since that is required by Moodle.
- After creating the database, you should now see the database name "sandbox" down the left-hand side of the screen inphpmyadmin.
- Localhost User
- You will want to create a user that interacts only with the Moodle database. This username and the assigned password will ONLY have localhost access to the server. Localhost access means anyone not accessing the server--as if they were sitting in front of it--would have access to the server. This prevents unauthorized use of over the Internet or the local area network of the user.
- Go to Privileges in phpmyadmin and create a user called "sandboxer" with the password of "Sandbox123%" without quotes. Be sure to GRANT ALL privileges.
A. Installing Moodle (View Video Walkthrough)
Step 8 - Securing XAMPP (View Video Walkthrough)
- Are you ready to install Moodle? You should now have 4 pieces of information:
- The name of the Moodle database - sandbox
- The name of the MySQL user allowed to access sandbox database - sandboxer
- The password of the MySQL user - Sandbox123%
- The location of the Moodledata folder - C:\xampp\mdata\sandbox(Note: If you are installing on a real server, change the "C:\" to reflect the drive where you installed XAMPP)
- Go to your web browser and type in the URL of the server, or, if on your own computer, type http://localhost/sandbox
- You should see the start of the Moodle installation. Follow the steps suggested.
- After you've installed Moodle, you should see everything pop up as normal.
B. Configuring Moodle (View Video Walkthrough)
After the installation of Moodle, you'll be asked to do some configuration of Moodle.
- Session Handling (View Video) - How to Deploy Multiple Moodle Instances on one server with different cookies
- Setting Up CRON Jobs (View Video: Part 1 | Part 2) - Read more about what is Cron. Use the Moodle Cron package. The simplest way is to use this little package MoodleCron-Setup.exe, which makes this whole thing very easy by installing a small Windows service. Run it and forget about it! :-)
- Managing Courses
Some additional topics:
C. Moodle User Authentication (View Video Walkthrough) - How do users login to Moodle?
- External Database Authentication - Interested in creating your own external database that users can authenticate to? Read these suggestions.
- Bulk User Import (View Video Part 1 and Part 2) - Need to quickly import users into Moodle? Although this isn't recommended for large numbers of users (e.g. use External Database or LDAP), it can be a handy trick to know! You may also want to read this tip on bulk updating user roles (e.g. switching students to teachers).
D. Adding Modules/Blocks/Themes to Moodle
The process for both of these involves placing the block/mod/theme in the similarly named folder within your Moodle instance (e.g. Sandbox) and then visiting the Site Administration->Notifications page and following the directions (click the UPGRADE button).
- How to Install Blocks/Modules into Moodle (View Video) - Here are some great recommendations for modules/blocks via Gavin Henrick at Some Random Thoughts blog.
- How to Install Themes into Moodle (View Video) - The process
E. Setting Up Email for a Moodle 2 instance (View Video) - If you want your forum email subscribers, email self-registration to work, you'll need to setup email on your Moodle instance.
- XAMPP installation is not secure as it is so you need to secure it. One of the ways to accomplish this is to follow the Security instructions available online.
- Go to http://localhost/security
- After taking these steps, remove the index.php file and the contents of the htdocs folder EXCEPT for the newly createdsandbox folder. Note: This will remove your access to phpmyadmin. We will install it in a moment.
Step 9 - Installing PHPMyAdmin (View Video Walkthrough)
- When you emptied out the contents of the htdocs folder--except sandbox--you removed the link to phpmyadmin, which allows you to interact with MySQL databases.
- Make a folder called "myadmin" without quotes.
- Unzip the contents of the phpmyadmin.zip file you downloaded in Step 1 into the myadmin folder. Make sure you do NOT have a folder path that looks like this: C:\xampp\htdocs\myadmin\phpmyadmin since that will cause problems. Instead, when you look at myadmin you should see a list of files.
- Go to C:\xampp\phpmyadmin and copy the config.inc.php and paste it into C:\xampp\htdocs\myadmin\
- Test that it's working by going to http://localhost/myadmin
- If successful, you should see a login screen for phpmyadmin
Step 11 - Upgrading Your Moodle 2.x Installation
Since you will eventually be called upon to upgrade your Moodle installation, this is what you need to do:
- Backup Your Moodle Database (View Tutorial)
- Backup your config.php file in your Moodle directory in htdocs
- Download the latest version of Moodle 2.x to your computer.
- Copy your old Moodle's themes, mods and blocks--this is a good time to upgrade
- them--into the new Moodle version you've downloaded from Moodle.org
- Delete everything else in your Moodle directory in htdocs EXCEPT the config.php
- Copy the contents of the new Moodle 2.x into your old directory.
- Go to http://localhost/moodlename/admin to complete installation
Get Blog Updates via Email!
Everything posted on Miguel Guhlin's blogs/wikis are his personal opinion and do not necessarily represent the views of his employer(s) or its clients. Read Full Disclosure