Skip to content

Commit

Permalink
Fixed some formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
quaec committed Nov 28, 2011
1 parent baff321 commit c0046b9
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions docs/INSTALL.rdoc
@@ -1,25 +1,25 @@
= INSTALL - lipsync = INSTALL - lipsync


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


== Server install == Server install


===Install required software ===Install required software


==== Debian (squeeze) / Ubuntu (maverick) ==== Debian (squeeze) / Ubuntu (maverick)
apt-get install openssh-server rsync apt-get install openssh-server rsync


Create a user to sync with, should be the same name as the one on the client 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 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 Verfiy the account was created, and setup a sync directory to sync with
su - USER su - USER
mkdir ~/sync mkdir ~/sync


== Client install == Client install


Debian (Squeeze or earlier) and Ubuntu (lsyncd 2.0.x) ==== Debian (Squeeze or earlier) and Ubuntu (lsyncd 2.0.x)
apt-get install lua5.1 liblua5.1-0-dev liblua50-dev liblualib50-dev apt-get install lua5.1 liblua5.1-0-dev liblua50-dev liblualib50-dev


wget http://lsyncd.googlecode.com/files/lsyncd-2.0.3.tar.gz wget http://lsyncd.googlecode.com/files/lsyncd-2.0.3.tar.gz
tar -zxf lsyncd-2.0.3.tar.gz tar -zxf lsyncd-2.0.3.tar.gz
Expand All @@ -28,65 +28,65 @@ Debian (Squeeze or earlier) and Ubuntu (lsyncd 2.0.x)
make make
make install make install


Debian (Wheezy and above) (lsyncd 2.0.x) ==== Debian (Wheezy and above) (lsyncd 2.0.x)
apt-get install lsyncd apt-get install lsyncd


Uninstall/remove ==== Uninstall/remove
/etc/init.d/lipsyncd /etc/init.d/lipsyncd
/etc/lipsyncd.conf.xml /etc/lipsyncd.conf.xml
/usr/local/bin/lsyncd /usr/local/bin/lsyncd
/usr/bin/lsync* /usr/bin/lsync*
/usr/bin/lipsync /usr/bin/lipsync
crontab -u USERNAME -r crontab -u USERNAME -r


new CRON: ==== new CRON


rsync -r -a -v -e "ssh -l phil" --delete 64.34.219.15:/home/phil/sync/ /home/phil/sync/ rsync -r -a -v -e "ssh -l phil" --delete 64.34.219.15:/home/phil/sync/ /home/phil/sync/


=== Install required software === Install required software


==== Debian (squeeze) / Ubuntu (maverick) ==== Debian (squeeze) / Ubuntu (maverick)
apt-get install openssh-client rsync unison lsyncd apt-get install openssh-client rsync unison lsyncd


Create a user to sync with, should be the same as the one on the server 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 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 Verfiy the account was created, and setup a sync directory to sync with
su - USER su - USER
mkdir ~/sync mkdir ~/sync


Install lipsync (if installing from git, first apt-get git-core) Install lipsync (if installing from git, first apt-get git-core)
cd lipsync cd lipsync
chmod +x setup chmod +x setup


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


Then run the setup script Then run the setup script
./install.sh ./install.sh


After you've answered the questions, watch the script's output for errors. Then, check the logs to see if lipsyncd started successfully 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 /home/$USERNAME/.lipsyncd/lipsyncd.log tail -f /home/$USERNAME/.lipsyncd/lipsyncd.log


= Test = Test


== Open 3 terminals == Open 3 terminals


=== Terminal 1 - on the client, become root and watch the logfile === Terminal 1 - on the client, become root and watch the logfile
tail -f /home/$USERNAME/.lipsyncd/lipsyncd.log tail -f /home/$USERNAME/.lipsyncd/lipsyncd.log


=== Terminal 2 - on the client, become your normal user === Terminal 2 - on the client, become your normal user
su - USER su - USER


=== Terminal 3 - on the server, run a watch on the sync directory === Terminal 3 - on the server, run a watch on the sync directory
watch ls -l /home/$USERNAME/sync watch ls -l /home/$USERNAME/sync
NOTE: this terminal will refresh every 2s by default NOTE: this terminal will refresh every 2s by default


=== Terminal 2 - on the client, create a new file in the sync directory === Terminal 2 - on the client, create a new file in the sync directory
touch sync/testfile 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 propagates to the server (Terminal 3). 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 propagates 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 propagating 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) 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 propagating 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 = 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. 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.

0 comments on commit c0046b9

Please sign in to comment.