WIT2 INSTALLATION HOWTO, VERSION 07-17-1999. An installation and update procedure that simplifies WIT2's installation is not yet finished. This means the instructions below are many, but we will try to cover it. Before you start, we would like to make you aware of the following, 1. Some sort of Unix machine is required. We develop on Intel/Linux, and it has been installed successfully on a Silicon Graphics machine and a SUN machine. We believe it should work on other machines as well, if versions of fasta, blast, clustalw exist for those platforms. And if not, some parts of WIT2 should still work. But it will not work on Windows NT or the MacIntosh. 2. The installed WIT requires about 2.6 Gb, but be ready with around 3.5 Gb, needed during unpacking and installation. 3. You will need to use basic Unix utilities and edit some configuration files. 4. WIT2 can be installed in "user space", within any directory you decide. A system password is not needed, but you still have the option of doing an installation that assumes that Perl is on the system, etc. Below we will install into a user account. We recommend that you install everything within one single directory, in a regular user account. Having everything contained within one directory has the advantage (among others) that you can easily delete everything if you dont like it or want to undo the installation, just do a "rm -R". Prepare for installation - ------------------------ 1. Check for an ANSI-compatible C compiler. Most machines have one, but type which cc or which gcc to see. The GNU C compiler (from the Free Software Foundation) is excellent and free of charge, get it from here, http://www.gnu.org/order/ftp.html Look for the site closest to you, and then for the highest version of gcc. Compilers normally are installed in the system area, so you should probably contact your system administrator. 2. The gzip compression/decompression program. If you do not have it, get it from here, http://www.gnu.org/order/ftp.html and install it in a user account or the system area (in agreement with system administrator.) 3. We suggest you (or your system administrator) create a separate user account for WIT2, called 'wit'. Alternatively, just choose a location for it. Below we use $WITHOME for either ~wit or whatever location you choose. You can set the WITHOME environment variable, export WITHOME=your-location # for bash, sh setenv WITHOME your-location # for tcsh, csh and then use the commands below exactly as they are given. Unpack the distribution - ----------------------- Change directory to WITHOME, and mount the first CD, cd $WITHOME mount /cd # or whatever mount point you use Then type cp /cd/wit-2.3_public-release.tgz.part1 . and unmount the CD. Now mount the second CD and copy the file wit-2.3_public-release.tgz.part2 to your current directory. You should then see the following files, wit-2.3_public-release.tgz.part1 (614400000 bytes) wit-2.3_public-release.tgz.part2 (230103548 bytes) Please check that the sizes match. Now concatenate these two files into one file in order to restablish the original compressed tar archive that we made, cat wit-2.3_public-release.tgz.part1 wit-2.3_public-release.tgz.part2 > WIT2.tgz Now unpack the archive, still within WITHOME; if your system uses GNU-tar, the correct command is: tar xpzf WIT2.tgz NOTE: tar does not accept the same parameters on all Unix systems. If this exact command does not work (it is taken from Linux), then read about tar (man tar) to see how to unpack a compressed tar archive. A way to unpack WIT that avoids creating huge intermediate files is to use one of the following pipelines, depending on which combination of commands exist on your system. If you have GNU-tar or another version of tar that supports the 'z' option (gzip-uncompression), use: cat wit-2.3_public-release.tgz.part1 wit-2.3_public-release.tgz.part2 | tar xpzf - (note trailing '-' --- this means read from standard-input, i.e., the pipe). If your tar does not handle gzip-files, but your zcat does, use: zcat wit-2.3_public-release.tgz.part1 wit-2.3_public-release.tgz.part2 | tar xpf - or finally, if neither your zcat nor tar handles gzip-uncompression, use: cat wit-2.3_public-release.tgz.part1 wit-2.3_public-release.tgz.part2 | gzip -dc - | tar xpf - or cat wit-2.3_public-release.tgz.part1 wit-2.3_public-release.tgz.part2 | gunzip -c - | tar xpf - If this unpacking went without errors (it may take 10 minutes or more to complete), then you can delete the .part1 and .part2 files. You should then have three directories in WITHOME, Package_sources Perl_modules WIT2 Install Apache WWW server - ------------------------- If Apache is already installed on your system, then you may choose not to install it once more. However, WIT2 requires a few special configuration options, so we recommend that you just install it within WITHOME. From WITHOME, go to the Apache source directory, cd Package_sources/apache_1.3.6 In the apache_1.3.6 directory, type the command ./configure --prefix=$WITHOME/Apache where $WITHOME is still the absolute path of the directory you chose for the WIT2 installation to go within. When completed, type make This will compile the server code. Then type make install which will move the binaries and configuration files in place. Finally type make distclean which will remove temporary files from the source tree. Now we must tweak the Apache configuration; change directory to the configuration directory, cd ../../Apache/conf and bring the file httpd.conf up in an editor. Most settings should be ok already, but there are a few things to do, 1. Go to the line that starts with 'Port 80'. If you run Apache as a normal user, then you must change 80 to a number higher than 1023. If the port number is 80, then the port number need not be specified in WIT2 url's, If it is (for example) 8080, then the port must be included in the url: http://your.machine:8080/WIT2/... 2. Not far below the port line, set ServerAdmin and ServerName to what you prefer. It should be a real e-mail address and machine name. 3. DocumentRoot. Set this to WITHOME/Docroot. 4. Go to the line that starts with - it is not far below the line where DocumentRoot is set. Change this line to what you set DocumentRoot to. 5. Immediately below, change the line Options Indexes FollowSymLinks to Options Indexes FollowSymLinks ExecCGI Includes 6. Go to the line DirectoryIndex index.html and change it to DirectoryIndex index.html index.cgi 7. Finally remove the '#' sign in the line #AddHandler cgi-script .cgi Now save the httpd.conf file. Now the server should be ready to run, but we are not ready to start it yet. Create some directories - ----------------------- Create the directory WITHOME/Docroot, and within it create a symbolic link to the WIT2 directory under WITHOME (remember to substitute WITHOME with the location you decided on above); type cd $WITHOME mkdir Docroot cd Docroot ln -s ../WIT2 WIT2 cd .. Create the directory WITHOME/Packages, mkdir Packages Create the directory WITHOME/Perl and a bin subdirectory, mkdir Perl cd Perl mkdir bin cd .. The Berkeley DB package - ----------------------- Change directory to Package_sources/db-2.3.16/build.unix and type ../dist/configure --prefix=$WITHOME/Packages And then, make make install This should things in proper subdirectories within $WITHOME/Packages. Phylip - ------ Go to the Phylip source directory, cd $WITHOME/Package_sources/Phylip In Makefile, substitute the line BINDIR = ./bin with the line BINDIR = ../../Packages/bin Now compile and install all programs, type make make install and remove temporary files with make clean FastA - ----- Go to the FastA source directory, cd $WITHOME/Package_sources/FastA Enter 'ls Makefile*' and of the Makefile's listed copy the one that has a suffix that looks like your system into 'Makefile'. On a Linux system, cp Makefile.linux Makefile Now substitute the line that contains 'XDIR = ' with the line XDIR = $WITHOME/Packages/bin # replace $WITHOME with its value and type make make install ClustalW - -------- Go to the Clustalw source directory, cd $WITHOME/Package_sources/Clustalw and type make make clean mv clustalw ../../Packages/bin ScanForMatches - -------------- Go to the ScanForMatches source directory, cd $WITHOME/Package_sources/ScanForMatches and compile the two C programs ggpunit.c and scan_for_matches.c. On Linux, and probably on most other Unix that has the gcc compiler, the following line works, gcc -O -o scan_for_matches ggpunit.c scan_for_matches.c and for a SUN, cc -O -DCC -o scan_for_matches ggpunit.c scan_for_matches.c move the file 'scan_for_matches' in place, mv scan_for_matches ../../Packages/bin Blast - ----- We chose not to include source code for Blast, since compiling Blast also requires the NCBI toolkit, which is not easy to set up. Instead, go to the executables directory, cd $WITHOME/Package_sources/Blast/executables and uncompress and untar the file for your system; e.g. for Linux, the commands would be, uncompress blast.linux.tar.Z tar -xvf blast.linux.tar Now move the binaries in place, mv blastall blastpgp seedtop fastacmd formatdb ../../../Packages/bin Perl 5.005 - ---------- We recommend that you install the Perl version that we supply even though you already may have some version of Perl installed on your system. The reason is, that we know the perl we supply works with our code (for example the pack function is not right in some versions of Perl 5.004), it does not take up too much space anyway, and our Perl version and its modules will not interfere with your system. If you do prefer to not install Perl again, please take note of the Perl path, we will need it below. Also, please make sure that your installed Perl has version number 5.004 or higher. To find out about version, type perl -v Installation of Perl involves answering lots of questions asked by a script. Go to the Perl sources, cd $WITHOME/Package_sources/perl5.005_03 and type ./Configure This will start a barrage of questions, but dont despair: if you either dont know the answer, or have no strong preference, just press the return key in response to every question. However, there are two questions to watch for, which need a non-default answer, 1. "Installation prefix to use? (~name ok) [/usr] " Here you respond with WITHOME/Perl, not literally but WITHOME is the full path of your chosen WIT2 location. 2. "Directories to use for library searches? [/usr/local/lib /lib /usr/lib] " Here you must enter WITHOME/Packages/lib /usr/local/lib /lib /usr/lib Good luck. The questions are many, but once you passed the second of the two questions above, just accept the proposed defaults to all questions. Now we must compile and test Perl (takes a while), type make make test If that went well, type make install make distclean Perl Modules - ------------ First install the DB_File module; go to its source location, cd $WITHOME/Perl_modules/DB_File-1.60 Then in the config.in file, substitute the line INCLUDE = /sandbox/Packages/include with INCLUDE = WITHOME/Packages/include and the line LIB = /sandbox/Packages/lib with LIB = WITHOME/Packages/lib now type $WITHOME/Perl/bin/perl Makefile.PL make make install make clean Perl 5.005 includes a more recent version of DB_File, but this version does not work well with the latest version of Berkeley DB. But we have had no problems with the combination of DB_File 1.60 and DB 2.3.16. The rest of the modules are installed the same way, except there is not file to edit; change directory to each of the modules and type (or cut and paste the following string), WITHOME/Perl/bin/perl Makefile.PL; make; make install; make clean; cd .. Some modules depend on others, but if you install in the following order, there should be no such complaints, Storable-0.6 Boulder-1.07 DB_File-1.60 Data-Dumper-2.101 Digest-MD5-2.07 Font-AFM-1.17 GD-1.19 GIFgraph-1.10 HTML-Parser-2.23 HTML-Tree-0.51 MIME-Base64-2.11 URI-1.03 libnet-1.0606 libwww-perl-5.44 There are two files, write.al and read.al, also included in Perl_modules/; create the directory WITHOME/Perl/lib/500502/auto/LWP/IO and copy both of these files into it. Preparing WIT - ------------- Now enter the WIT2 directory and edit the Makefile. Near the top of the file you will see lines like these, SHELL = /bin/sh MAKE = /bin/make PERL = /usr/local/bin/perl5 CC = /usr/bin/gcc WIT2_HOME = /home/wit/WIT2 Replace just these paths with the correct ones on your machine, then WIT2 will know how to find Perl etc. Now type make install This should set Perl paths in the scripts, unset protections where needed, etc. It may take a few minutes. For each program WITHOME/Packages/bin, create symbolic links in WIT2/bin that point to these programs. Or simply put a copy of all programs into WIT2/bin, cp $WITHOME/Packages/bin/* $WITHOME/WIT2/bin Will It Work .. - --------------- If you got this far without serious trouble, there is now a good chance that you have a working system. To see if it works, first start the Apache server; type $WITHOME/Apache/bin/apachectl start If there was no error message, you should now be able to see the first page of WIT2 by connecting your browser to http://your.machine.name/WIT2 or if you have set a non-default port number, eg 8080, connect like this, http://your.machine.name:8080/WIT2 If there seem to be very little data connected, go to WIT2/bin and type ./load_all_dbs If problems - ----------- If these instructions are unclear, or if you have problems getting it to work, then contact Niels Larsen, Email: niels@vitro.cme.msu.edu Phone: 630-579-8436 or alternatively call Ross Overbeek (630-369-2868) to report problems. We appreciate your going through this exercise with us. It is hopefully the last time you will have to do this much installation work. The WIT development team.