Open main menu

CDOT Wiki β

Changes

OPS345 Assignment 1

943 bytes added, 00:59, 26 January 2022
Sync files with www
== Sync files with www ==
 
Each of your web servers (www and all the slaves) need to have the same data on them. That means you need to synchronize the contents of /var/www/html. You might recall this is mounted from a separate drive (/dev/xvdf) but that doesn't matter for this assignment.
 
You'll use rsync to do the synchronization, but first you need to set up your user on www-slave1 to be able to ssh to www without a password.
 
* Create an ssh key on www-slave1 as your regular user. Make sure the key is stored in /home/yourusername/.ssh/id_rsa_wwwsync
** On www edit /home/yourusername/.ssh/authorized_keys
** Paste the contents of /home/yourusername/.ssh/id_rsa_wwwsync.pub from www-slave1 to the end of that file as one line.
* Test your key authentication setup as yourusername on www-slave1 to confirm you can log in to yourusername@10.3.45.11 (www) without a password:<source>ssh -i /home/yourusername/.ssh/id_rsa_wwwsync yourusername@10.3.45.11</source>