Jump to content

Recommended Posts

Posted

Well we've decided to stick with moodle as our VLE, we're too far down the moodle road to change really. We've had moodle running on an external website for over a year now, in that time the HOD for ICT has got it set up the way he wants. The problem is as this is hosted outside the school, it runs fairly slowly and uploading/downloading files from it can be a bit of a nitemare. Not to mention it is two versions out of date, and can be un-reliable at times.

 

We have available to us a large amount of webspace within our LEAs grid, as well as an established intranet server in school. My idea is to move it off the externally hosted site and have two instllations of moodle set up both talking to the same database. One of these would be used inside the school premises and would be hosted on our intranet server therefore making it much faster and more reliable for using in school. The second installation would be hosted on our externally accessible webserver but talking to the same database, thereofore giving the external access needed. Our externally accessible webserver is based at the grids HQ, so I don't want to exclusively host it on this, as this won't be a lot better than it is now!

 

My question is has anyone else moved moodle onto a new server, and if so, how easy was it and is there an easy to follow guide to ensure I don't loose any of the data?

Does anyone else run two separate installations that both use the same database?? Can anyone see any potential problems with running two installations and linking them both to the same database??

 

Cheers for any advice,

 

Mike.

Posted
My question is has anyone else moved moodle onto a new server

 

About 4 times.

 

if so, how easy was it and is there an easy to follow guide to ensure I don't loose any of the data?

 

1. You need to export the moodle database:

 

mysqldump -u username -ppassword moodle > moodle.sql
bzip2 moodle.sql

 

2. And backup your moodle data folder.

 

tar -cjvf moodledata /var/moodledata

 

3. Copy the resulting files off your server with SCP, FTP or whatever.

 

4. Setup your new server, install Apache, PHP, etc. Try and use the same versions as on your old server if possible. It's not the end of the world if you can't though as long as the versions aren't majorly different.

 

5. Grab the moodle install tarball and extract it into your webservers document root. Do not run the install process.

 

6. Create an empty database for moodle. Then restore your moodle database into it.

 

bunzip2 moodle.sql.bz2
mysql - u username -p password moodle < moodle.sql

 

7. Restore your moodledata folder.

 

tar -xjvf moodledata.tar.bz2 /var/moodledata

 

8. go to your web servers document root and copy the config-dist.php to config.php. Edit config.php to reflect your server settings.

 

9. Moodle should now work. Try loading it in your web browser.

 

Does anyone else run two separate installations that both use the same database?? Can anyone see any potential problems with running two installations and linking them both to the same database??

 

There is no sane way to keep two MySQL servers in sync over a WAN link. Therein lies the path to pain, suffering, data corruption and the dark side of the force.

Posted
The second installation would be hosted on our externally accessible webserver but talking to the same database

 

It would be easier to have the LEA reverse proxy the external access to your server, thus using one installation.

 

If you must do it like this then think about securing the database connection, I'd do it by tunneling the mysql through an ssh tunnel, I'd also use the ssh tunnel to keep the filesystem in sync.

 

I did move moodle, don't recall any issues, from memory I dumped the database, copied the files then reimported the database. but probably best to check this as I didn't write it down!

Posted
I do not know a vast amount about moodle in particular - but would it not make more sense to try and get your in house moodle server accessible externally so you only have one setup to worry about?
Posted
I do not know a vast amount about moodle in particular - but would it not make more sense to try and get your in house moodle server accessible externally so you only have one setup to worry about?

 

Oh how we'd love to do this, however LEA says no! What our LEA provide us with is a virtual server which is housed at their HQ. This virtual server has access to our network, as well as being accessable on limited ports by the outside world on our www. domian name. Therefore any services we want available to the outside world we have to host on this virtual server. It's worked for E-Portal and OWA so far, but not to sure how it would work for moodle. Communication between this server and our network is easy as it's actually on our domain, just not within our building.

 

Like I say, I would host moodle exclusively on this virtual server, except the link between the school and the LEA is so un-reliable at the moment, there's just to much risk of downtime, not to mention it's onlt a 10mbs link, so we wouldn't see that much benefit to hosting it where it is now.

 

@CyberNerd

You obviously understand the technologies involved a bit more than I do. What is reverse proxying? I think I may know what you mean by this, but an explanation might help. And as the communication between the database(s) is only between the LEA and the school on private cabling, is it really necessary to secure the connection, and if so how do I actually do that??

 

Mike.

Posted

http://en.wikipedia.org/wiki/Reverse_proxy

 

This is normally done with the apache mod_proxy, basically you configure the LEA virtual server to forward all http connections to your web server.

 

heres an explanation if ssh tunneling, I'm not sure if you'd need to go to these lengths if the connection is'nt over the internet, but it can't hurt.

 

http://www.rzg.mpg.de/networking/tunnelling.html

 

 

specific to mysql

http://www.whoopis.com/howtos/mysql_ssh_howto.html

Posted

Awesome. Going to have a play tomorrow, see if I can crack this.

 

Just one more question with reverse proxying, do you have to forward all http traffic, or can I select to forward only requests to certain areas, e.g http://www.nbc.medway.sch.uk/moodle could forward to my moodle server, where as http://www.nbc.medway.sch.uk/exchange can still be OWA as hosted on the virtual server already? hope you're with me there.

 

Thanks for your help,

 

Mike.

Posted
Maniac: Yes you can do virtual domains or directory aliases in Apache. We have several directories for Moodle, shared calendar, shared web pages. room booking etc. all going to different internal servers using the reverse proxy method.
Posted
http://www.nbc.medway.sch.uk/moodle could forward to my moodle server, where as http://www.nbc.medway.sch.uk/exchange can still be OWA as hosted on the virtual server already? hope you're with me there.

 

Yep , that's doable

 

you do something like this in the httpd.conf

 

LoadModule proxy_module modules/mod_proxy.so

ProxyPass /moodle/ [url]http://your_server:port/location/[/url]
ProxyPassReverse /moodle/ [url]http://your_server:port/location[/url]

 

 

 

documentation here:

http://httpd.apache.org/docs/2.0/mod/mod_proxy.html

 

this is also useful:

http://www.apachetutor.org/admin/reverseproxies

  • 3 weeks later...
Posted

There is no sane way to keep two MySQL servers in sync over a WAN link. Therein lies the path to pain, suffering, data corruption and the dark side of the force.

 

Couldn't you rsync the files across to the backup server then restore the database nightly? I know this won't make the intranet version usable as a live system as any new data would be wiped out on every restore.

 

Not sure of the point tho' as like has been said - why then keep 2 servers, why not just have the intranet server viewable from the web.

 

Just a thought.

Posted
There is no sane way to keep two MySQL servers in sync over a WAN link. Therein lies the path to pain, suffering, data corruption and the dark side of the force.

 

On my first read of this I assumed there would be only one MySQL server and both web servers would be set to use the same one.

 

Sounds messy to me, and having one with external access seems to be a much more logical choice if you can get it working.

Posted

There is a reason for me wanting two installations, the main one being reliability, and the second one being speed. Our internet connection provided by the LEA is not very reliable, keeps dropping out, running really slowly etc. and as it stands at the moment when the internet is down, the kids can't use moodle, which isn't really ideal, and also uploading work to it for grading is really slow, as it has to travel over the internet.

 

If we exclusively hosted it on our intranet server on the school site, then the kids would be able to use it in school time with no problems, but we won't be able to have external access to this, as the LEA will not route internet traffic directly into the schools network. Insted for hosting services requiring external access, they provide us with a server at their datacentre which we can load any applications on that we require to be accessed from outside the school. This server can talk to our network and also be addressed externally.

 

Why not host moodle just on the server at the LEA I hear you say? If this was our only installation, we would still be using our unreliable internet connection to access this server from within the school, and still have the issues of speed, so we'd be no better off than we are at the moment.

 

What I want is one installation hosted in school to work 100% of the time regardless of wether the internet is working or not, and a second installation on our server at the LEA to handle all users who want to use it from home.

 

It's a complex situation to explain, hope reading this you can understand why I might need two instances of it. I'm investigating using reverse proxying (as mentioned earlier on in this thread) to direct moodle traffic from my LEA provided server to the moodle server inside the school, but havn't got this working reliably eneough yet. If I can get this working, then this is the ultimate solution as it means I can get away with having only one instance that can be hosted inside the school.

 

Mike.

Posted

Short answer, not that we can find!

 

We are holding off on paying them this year, as the service has be so diabolical recently, we're going to try our best to negotiate a discount. We've had a total of over a weeks worth of downtime in the last 2 months, which is totally un-acceptable. It's not just this school affected, when it goes down, all schools in the LEA suffer, so there's obviously some serious issues that need addressing with their service.

 

As I can't rely on the LEAs connection, I need to plan a solution that is as fail safe as possible and doesn't rely on the connection. We are planning to base most of the curriculum around moodle next year, so it's crucial it is 100% reliable during school time, hence the reason to have moodle hosted on-site. I also need to ensure it is accessible externally, hence the reason to need it on the second server too.

 

Mike.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...