In anticipation of a Moodle workshop entitled, Energize! – Moodle on a Laptop, I’ve drafted my notes on many aspects of Moodle administration and created 5 minute video walkthroughs–updated for Moodle 2.2–for each topic. The videos are rough-hewn, but provide a better tutorial than screenshots and text, IMHO.
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.
XAMPP Windows Server for Moodle
- 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/
Step 2 – Install Software in this Order (View Video Walkthrough)
- 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.
Step 3 – Create Shortcuts and Necessary Folders (View Video Walkthrough)
- 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”)
Step 4 – Modify PHP.INI File (View Video Walkthrough)
- 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.
Step 5 – Start Using the XAMPP Control Panel (View Video Walkthrough)
- 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.
Step 6 – Working with MySQL (View Video Walkthrough)
- 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.
Step 7 – Installing and Configuring Moodle
- 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.
- 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
- 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).
- 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
Step 8 – Securing XAMPP (View Video Walkthrough)
- 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.
- 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 10 – Take a Break
- 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
Enter your email address:
Delivered by FeedBurner