Faq-O-Matic Faq-O-Matic : Administrators' Guide : Install :
How to migrate FOM to another machine | |
Disable the CGI stub (chmod a-x) so that you know no more changes are occuring to the FOM data on the old server.
Back up your CGI stub, metadata and serve directories on the old server. Install a copy of them on the new server. Move them to the appropriate locations. Tweak the CGI stub, if you need to, to accomodate changes in installation locations. (Consider using .htaccess to limit access to the new FOM to you until you have it configured.)
Connect to FOM on the new server. Access the install page. Go through "define configuration parameters," and fix up any paths that have changed, and the hostname part of $serveUrl. Save those changes, and "rebuild cache files."
| |
MOVING FOM OK, copy of the faq from one machine to the next DOES work! Verified! I should mention that my apache webserver is setup to serv from /var/www/html and cgi is in /var/www/cgi-bin. Also, I have apache setup to access as nobody:nobody for USER and GROUP. If you serve from somewhere else (e.g., your /home/joey/ directory), then you'll have to make some changes below!
INSTALL FOM ON DESTINATION MACHINE
ARCHIVE THE FOM SOURCE FILES >tar -cf fomarchive /var/www/cgi-bin/fom >tar -cf fommetaarchive /var/www/cgi-bin/fom-meta/ >tar -cf fomservearchive /var/www/html/fom-serve/
GET THE ARCHIVED FOM FILES TO THE DESTINATION MACHINE mount kyle.southpark.com:/home/kenny/tmpshare /home/kenny/tmpshare [source location with NSF running ] [distination version]
UNARCHIVE FOM ARCHIVES IN YOUR DESTINATION /HOME DIRECTORY >ungzip *.gzUse tar to extract directories but keep permissions, if everthing is same for source and destinatio (e.g., user & group in httpd are same): >tar --same-permissions -xvf *.tarIf destination apache user/group aren't the same, then see tar for how to specify new permissions for each file during extaction, or do it by had later (I'll tell you what they should be shortly). Replace the old destination versions with the new. My http server is nobody:nobody and the below directions will apply unmodifed if yours is setup the same. Otherwise, you'll have to change any references below to "nobody" to whatever your webserver USER is set to.
REPLACE FOM >rm /var/www/cgi-bin/fom >cp fom /var/www/cgi-binEDIT fom, make sure host is correct! It will be host of souce computer, and will need to be changed. Make sure it has appropriate owner, for me it's: -rwxr-xr-x root root fom
REPLACE FOM-META >rm -r -f /var/www/cgi-bin/fom-meta/ >cp -r -reply=yes fom-meta/ /var/www/cgi-bin/fom-metaMake sure it has appropriate owner, for me it's: drwxr-xr-x nobody root fom-metaFor me everything *inside* fom-meta is nobody:nobody For me everything *inside* fom-meta is -rw-r--r-- except: -rw------- cookies -rw------- idfile drwx------ RCSEverything *inside* fom-meta/RCS is nobody:nobody and -r--r--r--
REPLACE FOM-SERVE >rm -r -f /var/www/html/fom-serve/ >cp -r -reply=yes fom-serve/ /var/www/html/fom-serveMake sure it has appropriate owner, for me it's: drwxr-xr-x nobody root fom-serveInside fom-serve I have: drwxr-xr-x nobody nobody bags drwxr-xr-x nobody nobody cache drwxr-xr-x nobody nobody itemGo indside the /form-serve/cache/ folder and delete all its contents. The will be recreated later. This is totally safe!! For me, everthing *inside* /fom-serve/bags/ and /fom-serve/item/ are set to: -rw-r--r-- nobody nobody
EDIT THE CRUCIAL CONFIGURATION INFORMATION Line1: #!/usr/bin/perl -wT Line2: use lib '/usr/lib/perl5/site_perl/5.8.0';If the source and destination machines are setup identially, then do nothing. Edit the /var/www/cgi-bin/fom-meta/config file and change "$serverBase" so that it points to your destination machine. If your webpages and cgi are served from the same location on the source and destination machines, then you're done. If the webserve stuff is different on the destination machine, there might be additional changes to make here. However, I have not tried that. Edit the /var/www/cgi-bin/fom-meta/cronfile file and change the Perl and Perl lib path if necessary. You will also need to change the host to reflect the destination machine. As with the config file, if your webpages or cgi are served from a different place on the new machine, you may have to change other stuff in cronfile.
REDO THE FOM INSTALL/CONFIGURATION STEPS GO THROUGH AND DO EVERY STEP IN ORDER. EVERY STEP!When you get to the end, bookmark the new install page (yes, it will be different!). Then go to the faq (link is after the bookmark step). Congrats. It should work now. If not, make sure that things are where they are supposed to be. Make sure that things have the proper permissions (use the error message to tell whether FOM can't find something or whether it can't access something). That's it. It worked for me. Travis Seymour | |
[Append to This Answer] |
Previous: | How To Run FOM on Windows |
Next: | CGI server with different URL |
|