A Chic Geeks Moodle Adventure!
This is notes i’ve written to help fellow moodlers out there who may come across similar problems as i did.. if you need help feel free to post a comment - these notes aren’t bullet proof and may not work for everyone.
Development Environment
I have been developing on my local machine for months so I’m ready to migrate to a production server!
My setup is pretty normal - Ubuntu 8.04 sitting on Virtualbox on Windows host machine.
Virtual HDD sitting on a External USB Drive.
Following the Moodle docs installation page step-by-step to install and configure and develop:
http://docs.moodle.org/en/Step-by-step_Install_Guide_for_Ubuntu#Install_Ubuntu
Production migration notes:
Backup up the development server:
Using Navicat rather than terminal (which ever you prefer) - ran Dump SQL file on the development moodle database.
Copied the moodledata directory to a Shared location.
System Environment
Migration to a Virtual Machine on MS Server 2008 with Hyper-V It’s a controlled backed-up environment which was necessary.
Installation of Ubuntu 8.04 was done in the IT Dept on the Hyper-V Terminal. Created the VM with default settings - Mounting the Ubuntu ISO image installation took approximately 30mins.
As Ubuntu is not entirely supported by Microsoft we needed to install the Legacy Network driver in order to pick up a Network Adaptor.
IP address was picked up via DHCP.
Setting up a DNS entry if you like to yourdomain.com.au
Switching on Remote Desktop on the Ubuntu VM to enable VNC into the machine as RDP is not supported on Ubuntu
Installed RealVNC on my Windows client to Remote into the machine and started the migration process.
Installing Moodle
Following the Moodle docs installation instructions again, proceeded to install Moodle on the production server.
Remember to add ServerName {yourdomain.com.au} to the apache2.conf file at the end of the file if you have a DNS entry – if you don’t Apache throws: Could not reliably determine the server’s fully qualified domain name, using 127.0.1
After installing the necessary lib’s followed the Moodle migration notes side-by-side the installation instructions -> http://docs.moodle.org/en/Moodle_migration
After copying the moodledata directory to the production server (make sure you re-set the necessary permissions via - sudo chown -R www-data.www-data /var/moodledata)
Using Navicat again I Executed the Batch file on the production moodle database and selected the SQL dump file I created previously.
This restored all the necessary database values into the production server in approximately 2mins.
Also run the replace.php in the new address header to make sure references to the old ip address doesn’t exist in the new database.
After browsing to the new address domain I noticed that I received the following error after trying to login as Admin user: Your session has timed out please login again.
After trying multiple password combinations I found that the problem was not in the password – using an md5 generator I checked the md5 hash result in the mdl_users table my password hadn’t changed. I proceeded to check the moodledata folder and realised that I did not reset the permissions on the folder. So run sudo chown -R www-data.www-data /var/moodledata) – again if you have to
After setting the correct permissions it worked! wo0t
LDAP authentication yay me!
The first document to check is http://docs.moodle.org/en/LDAP_authentication following the guidelines enter in the correct information in the LDAP authentication page within Moodle.
Make sure IT gives you the correct LDAP address – mine was incorrect after checking.
Moodle suggests you put each string within single quotes. I found after much testing that this is not necessary (however it may still work for you)
Using the below utilities it is imperative that you gather the correct distinguished name as well as search context for LDAP.
Testing utilities used:
Ldap.exe
Softerra LDAP Browser
After multiple attempts to get LDAP working I found on the Moodle forums a test_ldap.php script that a user had contributed - http://moodle.org/mod/forum/discuss.php?d=79465
placing the file in the ldap folder and browsing to it – I tested using different different values for the DN and bind user – I found the following worked:
LDAP Host URL: ldap.yourdomain.com.au
LDAP Host Port: 389
Bind User DN: myname@mydomain.com.au
Bind Password: mypassword
For some the Bind user DN may be contextual and you may need to explicitly specify DC=you,DC=yourdomain,DC=com,DC=au
Test everything – but the test_ldap script rocks!
After testing with the script you get a green response and your good to go!
To be continued… I have more to post about mods and user logins ..
