Changes between Initial Version and Version 1 of WirmRepos


Ignore:
Timestamp:
05/08/06 13:34:25 (12 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WirmRepos

    v1 v1  
     1== Installing WIRM and repos on SIG servers under Red Hat Enterprise == 
     2Last updated 9/26/05 jfb 
     3 
     4When complete this document will assume that all wirm production servers 
     5are running on sphenoid, and that the purpose of this document is to 
     6describe how to create a development version of a wirm server, do some 
     7work on it, then update the production version. Right now bmap_repo, 
     8image_repo and eyelab_repo are running in the correct locations on 
     9sphenoid, so celo is still special case notes that I 
     10(jfb) am keeping so I remember how to move this to production 
     11status. The notes also assume that the development version will be 
     12installed in the same location as the production versions, ie 
     13`/usr/local/databases/wirm`. These notes should be updated to also 
     14describe how to install in a user's `public_html` directory, which is 
     15the likely case for those who don't have root privileges. 
     16 
     17Most of the operations below need to be done by root. Admin_pass is 
     18the same as the mysql wirm password, which is shown in these notes as 
     19"sample". Should be something other that for real system. Machine name 
     20is synapse for these notes. Change to the appropriate machine when 
     21installing. 
     22 
     23 
     24 
     251. Pre-requisite software 
     26Much will already be installed. For software which is not, add rpm site to up2date sources 
     27{{{ 
     28echo 'apt dag-el4 http://apt.sw.be redhat/el4/en/i386 dag' >> /etc/sysconfig/rhn/sources 
     29rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt 
     30}}} 
     31For WIRM 
     32  Should already have perl5, Mysql, CGI 
     33{{{ 
     34  up2date  ImageMagick-perl 
     35# May need the --nosig flag for some of these , eg up2date --nosig perl-Text-CSV 
     36# For bmap_repo 
     37  up2date  perl-Text-CSV 
     38# For image_repo 
     39  up2date perl-XML-Simple 
     40# This one seems to have a problem. did google search,  
     41#         manually downloaded perl-Archive-Zip-1.14-4.i586.rpm 
     42#         did rpm -i perl-Archive-Zip-1.14-4.i586.rpm 
     43  up2date perl-Archive-Zip  
     44# For celo 
     45  up2date perl-XML-Parser 
     46  up2date perl-XML-SimpleObject 
     47}}} 
     48 
     492. Mysql 
     50{{{ 
     51mysql 
     52>>  use mysql 
     53>>  delete from user where User=''   
     54#Otherwise wirm@localhost will not have needed permissions 
     55 
     56#Give all privileges to wirm user, may remove some privileges. At minumum need select, insert, update,  
     57#delete, create database, drop databases (create and drop needed by celo) 
     58 
     59>>  grant all on *.* to 'wirm'@'localhost'  identified by 'sample'  
     60>>quit 
     61}}} 
     62 
     63 
     643. Apache web server 
     65In these notes I use symbolic links as per WIRM installation scripts. Could also use aliases. 
     66{{{ 
     67cd /etc/httpd/conf.d 
     68edit local.conf to handle all local configuration 
     69See synapse:/etc/httpd/conf.d for my approach 
     70Puts Document Root in /usr/local/www/htdocs 
     71     Logs in                        /logs 
     72     cgi-bin in                     /cgi-bin 
     73}}} 
     74 
     754. WIRM 
     76{{{ 
     77mkdir /usr/local/databases 
     78cd /usr/local/databases 
     79cvs checkout -d wirm src/wirm 
     80cd wirm 
     81mkdir var 
     82cd wirm/wrm/lib 
     83cp conf.pl.sample conf.pl 
     84edit conf.pl to have  this configuration 
     85  # Local machine configuration 
     86  %WRM_CONF = ( 
     87    wirm_install      => "/usr/local/databases/wirm", 
     88    admin_pass        => "sample", 
     89    var               => "/usr/local/databases/wirm/var", 
     90    doc_root          => "/usr/local/www/htdocs", 
     91    cgi_path          => "/usr/local/www/cgi-bin", 
     92    cgi               => "/cgi-bin", 
     93    htdocs            => "", 
     94    mime_general      => "/etc/mime.types" 
     95  ); 
     96cd conf 
     97install.pl 
     98}}} 
     99Test by pointing web browser at 
     100     http://synapse.biostr.washington.edu/cgi-bin/wrm/console.pl 
     101     Should show a page saying "You must first set the repository". 
     102 
     1035. Image_repo 
     104If you want to use the same data as on the production server first make a backup of the production data 
     105{{{ 
     106  ssh sphenoid 
     107  cd /usr/local/databases/wirm/wrm/lib/backup 
     108  repo-backup.pl image_repo <backupath> (like ~/temp/image-091505) 
     109Now install on another machine, assuming you have root privileges 
     110ssh synapse 
     111mysql -u wirm -p 
     112 
     113>>create database image_repo 
     114>>quit 
     115 
     116cd /usr/local/databases/wirm/repos 
     117cvs checkout -d image_repo src/repos/image_repo 
     118cd ../wrm/lib/conf 
     119repo-init.pl image_repo 
     120cd /usr/local/databases/wirm/repos/image_repo/htdocs 
     121cp index.htm.sample index.html 
     122Edit as appropriate 
     123If you want to create a new database without copying from the original: 
     124  define_schema.pl 
     125else (if you want the same data as on the production version) 
     126  cd /usr/local/databases/wirm/wrm/backup 
     127  repo_restore.pl image_repo <backuppath> (like ~/temp/image-091505) 
     128cd /usr/local/databases/wirm/var/repos/ 
     129chown -R apache.apache image_repo #Apache needs to be able to write here 
     130}}} 
     131Test by pointing web browser at 
     132     http://synapse.biostr.washington.edu/repos/image_repo 
     133     Should show main page for image_repo 
     134 
     1356. Eyelab_repo 
     136First make a backup of the production data because there is as yet no 
     137define_schema.pl script 
     138{{{ 
     139  ssh sphenoid 
     140  cd /usr/local/databases/wirm/wrm/lib/backup 
     141  repo-backup.pl eyelab_repo <backupath> (like ~/temp/image-091505) 
     142Now install on another machine, assuming you have root privileges 
     143ssh synapse 
     144mysql -u wirm -p 
     145 
     146>>create database eyelab_repo 
     147>>quit 
     148 
     149cd /usr/local/databases/wirm/repos 
     150cvs checkout -d eyelab_repo src/repos/eyelab_repo 
     151cd ../wrm/lib/conf 
     152repo-init.pl eyelab_repo 
     153cd ../backup 
     154repo_restore.pl eyelab_repo <backuppath> (like ~/temp/eyelab-091505) 
     155cd /usr/local/databases/wirm/var/repos/ 
     156chown -R apache.apache eyelab_repo #Apache needs to be able to write here 
     157}}} 
     158Test by pointing web browser at 
     159     http://synapse.biostr.washington.edu/repos/eyelab_repo 
     160 
     161 
     1627. Bmap_repo 
     163{{{ 
     164If you want to use the same data as on the production server first make a backup of the production data 
     165  ssh sphenoid 
     166  cd /usr/local/databases/wirm/wrm/lib/backup 
     167  repo-backup.pl bmap_repo <backupath> (like ~/temp/bmap-092605) 
     168Now install on another machine, assuming you have root privileges 
     169  ssh synapse 
     170Create the database 
     171  mysql -u wirm -p 
     172  >>create database bmap_repo 
     173  >>quit 
     174Checkout the code 
     175  cd /usr/local/databases/wirm/repos 
     176  cvs checkout -d bmap_repo src/repos/bmap_repo 
     177Initialize the repository 
     178  cd ../wrm/lib/conf 
     179  repo-init.pl bmap_repo 
     180Set the owner of the writeable directory 
     181  cd /usr/local/databases/wirm/var/repos 
     182  chown apache.apache bmap_repo #Apache needs to be able to write here 
     183Copy data from the previously backed-up  bmap_repo from the production server 
     184   cd /usr/local/databases/wirm/wrm/lib/backup 
     185   repo-restore.pl bmap_repo ~/temp/<backuppath> (like ~/temp/bmap-092605) 
     186Edit local configuration variables 
     187   cd /usr/local/databases/wirm/repos/bmap_repo/lib 
     188   edit the file repoconf.pl 
     189      $WRM_CONF{xmridb_path} is directory where the file bmap-xmri-db-data.lsp  
     190      will be written. This will need to be writeable by the web server.  
     191      This is a data file used for the skandha based visual 
     192      brain mapper. For development choose a location different than  
     193      the production location. 
     194Test by pointing web browser at 
     195   http://synapse.biostr.washington.edu/repos/bmap_repo 
     196   Should show main page for bmap_repo 
     197}}} 
     198 
     1998. Celo 
     200Current production celo is on sphenoid in 
     201/usr/local/databases/merged_wirm, needs to be moved to wirm without 
     202losing any data. Needs a backup script. The following shows how to 
     203install a new version of celo with no old data. 
     204{{{ 
     205cd /usr/local/databases/wirm 
     206cvs checkout -d celo src/celo 
     207cd celo 
     208install.pl 
     209cd /usr/local/www/cgi-bin 
     210chown apache.apache labs 
     211cd /usr/local/www/htdocs 
     212chown apache.apache labs 
     213cd /usr/local/databases/wirm/var 
     214chown apache.apache labs 
     215cd /usr/local/databases/wirm 
     216chown apache.apache labs 
     217Test by pointing web browser at  
     218     http://synpase.biostr.washington.edu/celo 
     219}}} 
     220 
     2219. Affected directories for all the above 
     222{{{ 
     223/usr/local/databases/wirm 
     224/usr/local/www/htdocs 
     225/usr/local/www/cgi-bin 
     226}}} 
     227 
     228== For CELO == 
     229 
     230(JDF version) 
     231 
     232--Steps to install CELO on sphenoid: 
     233 
     234{{{ 
     235up2date perl-XML-LibXML 
     236http://dag.wieers.com/packages/perl-XML-Parser/perl-XML-Parser-2.34-1.2.el4.rf.i386.rpm 
     237http://dag.wieers.com/packages/perl-XML-SimpleObject/perl-XML-SimpleObject-0.53-1.2.el4.rf.noarch.rpm 
     238 
     239mkdir /usr/local/databases/merged-wirm 
     240cd /usr/local/databases/merged-wirm 
     241cvs checkout -d celo src/celo 
     242cvs checkout -j sig-vivalog-merge-branch -d wrm wirm 
     243 
     244cp ../wirm/wrm/lib/conf.pl wrm/lib/ 
     245vim wrm/lib/conf.pl # especially change WRM_CONF{cgi} to '/celo-cgi/' 
     246 
     247mkdir cgi 
     248mkdir var 
     249 
     250cd celo 
     251./install.pl 
     252usermod -G celo apache 
     253vim htdocs/index.htm # change links to '/celo-cgi/' 
     254}}} 
     255 
     256Add to Apache vhost: `ScriptAlias /celo-cgi/ /usr/local/databases/merged-wirm/cgi/`t