0

I have one server Centos(called A) is running Apache and mysql server Now I have another one (called B) ,I set up Apache and mysql server in the same way with A. How can I synchronize the web folder and the database of server A -> server B in real time ?

billyduc
  • 1,617
  • 8
  • 24
  • 26
  • 1
    billyduc, if an answer was helpful to you please vote it up or accept it as the answer. That is after all the driving force for the people who spend their time answering question. – Martijn Heemels Sep 20 '09 at 15:00

1 Answers1

2

For the Apache folders, why not just mount A's folder in B's filesystem? That way they'd both be looking at the same set of files with no need to sync. Alternatively, since you're using CentOS, you could try the GFS filesystem (http://www.centos.org/modules/news/article.php?storyid=108) if simple RSync isn't enough.

For the MySQL, the best way would be replication - the relevant documentation is here.

RainyRat
  • 3,730
  • 1
  • 24
  • 29
  • I don't like the idea of having B use the filesystem on A. That creates a huge dependency and if A ever goes down, B goes down as well. Some sort of syncing (via rsync) or clustered file system should be used. – Joshua Sep 20 '09 at 17:27
  • RSync would be how I would do it, but the question specified "in real time". – RainyRat Sep 20 '09 at 22:45