Friday, December 10, 2010

Use FAM and IMON in Linux under implemented data replication

Then run the config or menuconfig, choose the "file system" section select "InodeMonitor (IMON) support (EXPERIMENTAL)", compile the kernel to reboot the system.

Compiling FAM itself is very simple, in the source file directory FAM run./configure and makeallinstall and you are done. Below we will install the SGI:: FAM call Perl module, we can use perl to write an event handler. Install the SGI:: FAMPerl modules you don't really want to use the C/C ++ to programming? I don't know about you, but I'm lazy, but I also lack patience, so I used perl to write copy management program. The download and install the SGI:: FAM issues can find jessen.glickjglick@sig.bsh.com). To install these modules Express is very simple, run CPAN module: perl-MCPAN-esellinstallSGI:: AM so that installed the SGI:: FAM and all necessary modules. Implementing replication with Fam_mirror Fam_mirror I wrote the script for automatic replication of procedures. To learn more about Fam_mirror, you can go to the view that if http://www.linuxfocus.org/common/src/article199/fam_mirror.html to download, please go to http://www.linuxfocus.org/common/src/article199/fam_mirror Fam_mirror. You can re-edit this program will be $ replicaHosts to current host, $ rsh to current use of the shell, you can also change $ rsync to achieve the same functionality. Next, we'll look at first: there are two machines do WEB server (web1, web2). One of the primary server (e.g. web1) and the other one is from the server (web2). The first FTP server web1, web2 is utterly unable to run the FTP service (otherwise, the system works in backup mode is also possible to write data to a file). In the two servers, web documents are placed in a directory in/var/www two machines in rsh or SSH, so that you do not need password web1 can run a remote command web2. I usually copy the host added in authorized_keys in my ssh_key to implement this requirement. The web1 data remote synchronization commands on the web2 is: rsync-avz/var/wwwweb2:/var/www/Edit Fam_mirror file, A HREF = "mailto: @ replicaHosts to read:" the > @ replicaHosts to: & nbsp @ replicaHosts = qw (web2) run Fam_mirror on the web1: fam_mirror/var/www & so that if a file on the web1 changes, such changes will be written to a file on web2. Now let's look at scenario 2: (System has more than one Web server) host linuxweb1, linuxweb2, linuxweb3 and linuxweb4 is a web server. Host linuxftp1 is ftp server (master server). Web hosts do not open the FTP service to users. Installed on the host linuxftp1 FAM and IMON, SGI:: FAM and Fam_mirror. Each host on reset rsh or ssh. Linuxftp1 without password to four WEB servers running the remote command. Edit Fam_mirror and? A HREF = "mailto: @ replicaHosts to: the > @ replicaHosts to: & nbsp @ replicaHosts = qw (linuxweb1 linuxweb2linuxweb3linuxweb4); if necessary you can also change $ rsh and $ rsync, assuming the Web text placed in various machine/var/www directory. In the run on linuxftp1: INIT_MIRROR = 1fam_mirror/var/www & so that four Web servers are on linuxftp1 changes file for the update.

No comments:

Post a Comment