My Load-balance script

Script to copy from WebServer-A to WebServer-B. This to enable Load-balance.

At WebServer-A:-

  1. ssh-keygen -t rsa
  2. scp id_rsa.pub root@WebServer-B:/root/.ssh/authorized_keys
  3. vi copyall and write rsync -ave ssh –numeric-ids –delete /var/www/html WebServer-B:/var/www/html
  4.  add entry in cronjob for every 1/2 hour.

At Webserver-B:-

  1. as root, chmod 644 /root/.ssh/authorized_keys
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.