![]() The reason for this is that on Debian-based systems, the If the www-data user and group don’t have ownership of your website files, you can set this with: After this we need to add the www-sync user to the www-data group: You’ll be prompted with a few questions for the user, all of which you can skip through except the password request, for which you should assign a secure password. We’ll call this user www-sync to make its purpose clear. We could use the root user but that may pose a potential security risk. With that installed, we’ll need to create a user that can synchronize the files. So we’ll start with installing both unison: All the steps will need to be performed on each server, so we’ll start with setting everything up on the first one, then the process can be repeated for the second. Next time we’ll be looking at a solution to automate that. The downside to Unison is that it needs to be run every time you want to synchronise the changes it doesn’t run as a daemon. ![]() It comes with the standard repositories on Debian-based Linux distributions which helps make getting set up simple. It can also be used to synchronize directories across different systems, such as Windows to Mac or Linux to Windows. This can be done using two directories on the same server or across multiple servers. Unison is a nice and effective tool for synchronizing the files between two directories. Using Unison to Synchronize Files Between Two Directories For this we’ll be using the Unison file synchronization tool. ![]() With our database now being replicated between the servers, the next step is to ensure that the website’s files will also be replicated between them. So far we’ve looked at how to get the servers set up, and configuring the MySQL server on each server in a Master-Master replication setup. Welcome back to our series on using the VPS.net public cloud to build your own highly available website solution.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |