Unison synchronize3/12/2023 For the first time, enter the PASSWORD Command Format: ssh remote username Remote Host IP address 'remote command or ~]# ssh 'hostname'ģ. (3) run the command remotely to test whether the command is successful. Press ENTER wherever necessary, generate a certificate that establishes a security trust ~]# ssh-keygen -t rsaNode1 establishes a trust relationship with ~]# chmod 600 ~]# scp -r /root/.ssh/id_rsa.pub 192.168.5.20:/root/.ssh/authorized_keys(2) perform the same operation on node2 to Establish a trust relationship between node2 and node1. For details about how to configure the two-host ssh Trust, see (1) execute the ssh-keygen command under the root user of node1. install the software on node1 and node2 (1) install ~]# yum install ocaml -y(2) install ~]# yum install unison240.x86_64 -y(3) install ~]# yum install inotify-tools.x86_64 -y2. Server node1: 192.168.5.10, synchronization Directory:/opt/http/Server node2: 192.168.5.20, synchronization Directory:/opt/http/Configure the epel Source InotifySimple: create a file descriptor, attach one or more monitors (one monitor is a path and a group of events), and then use the read method to get events from the descriptor. You can also track the source and target details of an activity. inotifyIs a Linux kernel feature that monitors the file system and sends event warnings to specialized applications in a timely manner, such as delete, read, write, and uninstall operations. You can synchronize data from A to B or from B to A without additional settings. ![]() Even better, unisonTwo-way synchronization is supported. ![]() ![]() It not only supports local synchronization, but also supports synchronization through network protocols such as SSH, RSH, and Socket. UnisonIt is a file synchronization tool across windows, linux, and mac OS platforms. Unison + inotify implement real-time bidirectional data synchronization
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |