Two hosts, one local host IP Address: 192.168.200.36 and one remote host IP Address: 192.168.200.28
Install the unison-full software package CD on the 36 and 28 hosts to the unison-full software package directory.
Rpm-IVH unison-2.40.63-1.el6.rfx.86_64 \ (11). rpm
Generate the ssh-keygen-d key certificate on host 36 until the key is generated
Send the public key to the remote client ssh-copy-ID-I/root/. Ssh/id_dsa.pub. [email protected]
SSH [email protected] can be accessed without a password
Create a directory named mkdir. unison in the root directory.
Edit Vim. unison/Default. PRF as follows:
Root =/OPT
Root = SSH: // [email protected], 200.28 // opt target path
Bath = ture forced Synchronization
Sshargs =-C keep Compression
Fastcheck = true
Repeat = 1
Owner = true
Group = true
Perms =-1
Logfile =/root/. unison/unison_test.log
Start nohup unison default. PRF &
In this way, dual synchronization is implemented under the/OPT directory on both hosts.
This article is from the "Arctic Linux" blog. For more information, contact the author!