Skip to content

Latest commit

 

History

History
71 lines (46 loc) · 3.17 KB

INSTALL.rdoc

File metadata and controls

71 lines (46 loc) · 3.17 KB

INSTALL - lipsync

To get started with lipsync you need at least a client and a server, perferably on multiple systems

Server install

Install required software

Debian (squeeze) / Ubuntu (maverick)

apt-get install openssh-server rsync unison

Create a user to sync with, should be the same name as the one on the client useradd -U -m -d /home/USER -p PASSWORD -s /bin/bash USER

Verfiy the account was created, and setup a sync directory to sync with su - USER mkdir ~/sync

Client install

Install required software

Debian (squeeze) / Ubuntu (maverick)

apt-get install openssh-client rsync unison lsyncd

Please make sure that lsyncd installed is version 1.x and not version 2.x as it uses different config files.

Create a user to sync with, should be the same as the one on the server

useradd -U -m -d /home/USER -p PASSWORD -s /bin/bash USER

Verfiy the account was created, and setup a sync directory to sync with su - USER mkdir ~/sync

Install lipsync (if installing from git, first apt-get git-core) git clone git://github.com/philcryer/lipsync.git cd lipsync chmod +x setup.sh

NOTE: during setup, define server IP, path to sync, username and password, so have those ready

Then run the setup script sudo ./setup.sh

After you’ve answered the questions, watch the script’s output for errors. Then, check the logs to see if lipsyncd started successfully tail -f /var/log/lipsyncd.log

Test

Open 3 terminals

Terminal 1 - on the client, become root and watch the logfile

su - root tail -f /var/log/lipsyncd.log

Terminal 2 - on the client, become your normal user

su - USER

Terminal 3 - on the server, run a watch on the sync directory

watch ls -l /home/USER/sync NOTE: this terminal will refresh every 2s by default

Terminal 2 - on the client, create a new file in the sync directory

touch sync/testfile

At this point you should see action on the logfile (Terminal 1), and after a few seconds delay, the file should appear in the server’s sync directory (Terminal 2). If this worked, then delete the file on the client (Terminal 2) and see if that change propogates to the server (Terminal 3).

Now try more complex situations by using directories that are full of other files, then file or directory names with spaces in them, then ones with special characters (!@#$%^&*_-) in them. These should all work the same as the initial examples, always propogating to the server after a slight delay (the delay occurs so lsyncd can prevent spinning up for every little change - if there are other changes after the first one they will be chained to the one sync, making things more efficient)

Install more clients

Now that you have a working 2 node setup, it’s time to install on more clients. All you need to do is follow the same client install directions on each client you add. Be sure to use the same server IP or domainname, this way Unison will work in a star style setup, with the server being the hub, and the clients all serving as spokes. This way the hub ‘wins’ if it has something the spokes need, but will sync-up by deleting any missing files from the spoke in the hub. It sounds more complicated than it is, but suffice to say, it works.