Installing and testing previous CGI versions

From Genecats
Revision as of 17:57, 19 March 2018 by Chmalee (talk | contribs) (Running a VM with old source code)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Setting up a mirror with an archived CGI version is relatively easy and consists of four main steps: 1. get and setup linux VM 2. download and install a mirror with the GBiC (to setup mysql/apache/etc) 3. download the source code 4. compile the code.

Step 1.

Step 1 is getting a Linux Virtual machine running in some form. I like to run CentOS VMs cause that's what the RR/dev/beta run on. There's a guide for setting up Vagrant here, but you can do it however you want. Once I have the VM running I like to install a few tools and setup a basic .bashrc to make things more convenient. For the case of testing the TrackCheck tool against the old CGI's, I installed the following tools: sudo yum install -y wget vim rsync libuuid-devel R httpd mysql ant libpng gcc gcc-c++ httpunit jtidy rhino mysql-connector-java libpng-devel mariadb-devel git And added the line "set -o vi" to my .bashrc (totally optional I just like vi mode on the command line). The ant, jtidy, httpunit, and mysql-connector-java programs are all specific to TrackCheck and are not normally required.

Step 2.

After your VM is running and you have all the necessary dependencies installed, the next step is to use the GBiC to install the current CGIs and to get a free Apache/MySQL setup. Only one command is needed: sudo bash browserSetup.sh -b install

And you should be set. We're gonna overwrite the CGIs in step 4 so no need to worry about them.

Step 3.

Download the source code. A zip file of the source is available here: http://hgdownload.soe.ucsc.edu/admin/

And is installed with the following commands: wget http://hgdownload.soe.ucsc.edu/admin/jksrc.v361.zip unzip -q jksrc.v361.zip

Step 4.

Compilation is "easy", but will vary depending on the system. First make libs: cd kent/src make libs

If this fails it's probably because a dependency is missing, just read the error message and google for the right library to install.

After a successful make libs (which can take a while), first make the CGI's overwritable and then make alpha: sudo chmod -R 777 /usr/local/apache/ cd kent/src make alpha

Don't worry about making CGI's readable by the world since hopefully this mirror is confined to localhost and will be deleted when you're done testing anyways right?