Our goal was to split out the Apache & PHP services from the MySQL service running on our Moodle server. The decision to do this was to address performance issue experience on the opening day of school after upgrading from Moodle 1.9 to 2.1 and switching server platforms from Linux to Apple.
So the question is where we able to do it and did it work? Yes.
The following are the steps we took to split the services:
- Take the existing server offline.
- Clone server to new Apple Mini server (new)
- Used Carbon Copy Cloner
- approx. 180GB of data via Firewire 800 – 3hr 38minutes to transfer
- Configure the new server as Apache/PHP web server
- Change server serial number to avoid conflict
- Changed IP – Unix command – only needed if this machines IP is changing – we changed IP, but kept hostname
- sudo changeip [space] 123.456.789.000 [space] 987.654.321.000 [space] www.oldhostname.com [space] www.oldhostname.com
- Turn off MySQL service
- Change Moodle config.php file to point to MySQL server.
- $CFG->dbhost = ‘OLD HOST’; to $CFG->dbhost = ‘NEW HOST’;
- Double-check web server configuration
- Configure MySQL server (existing box)
- Turn on ‘Allow network connections’ in MySQL settings
- Configure access to moodle db my external host
- NOTE: This is a point we struggled with as we thought that the ‘Allow network connections’ would handle this step. Needed a MySQL admin tool (or command line) to add remote host and assign permissions – used MySQL Administrator
- Changed host name – we kept old IP but installed new hostname
- sudo changeip [space] 123.456.789.000 [space] 123.456.789.000 [space] www.oldhostname.com [space] www.newhostname.com
- Make network changes (depends on infrastructure):
- Firewall ports
- Port forwards
- NAT changes
This process may not be the perfect process to use. We cloned servers as we had made numerous changes to configuration file during the original build that we didn’t want to worry about missing. If there is something that seems odd or you believe we may have missed, please leave a comment as it will help us an other who might ready the post.