LAST UPDATE October 27, 2003

REFERENCES

SETTING UP UPS/UPD

This should look a lot like http://www-d0.fnal.gov/software/cmgt/install_ups.html but is perhaps more up-to-date.

  1. register your machine to download paqckages from the central fermilab servers by filling out the form at: http://computing.fnal.gov/forms/upd_registration.html
  2. download ups/upd bootstrap RPMS from fermi-linux 7.3 server You will need two RPMS: upsupdbootstrap-2.2-8.i386.rpm upsupdbootstrap-generic-2.2-2.i386.rpm If you are using a different version of redhat you can look under a very similar path replacing 73rolling with the appropriate fermilinux version. For convienience a copy of the RPMS are also available here upsupdbootstrap-2.2-8.i386.rpm and upsupdbootstrap-generic-2.2-2.i386.rpm .
  3. install upsupdbootstrap-2.2-8.i386.rpm. Edit /var/tmp/upsupdbootstrap/prd/bootstrap/v2_2/configs/generic to setup the databases you need. I have included my bootstrap_config.txt file here to show which ones I set up. These include a general FNAL products area /projects/d0/ups, a D0-specific products area /projects/d0/usr and a code distribution area /projects/d0/dist.
    rpm -i upsupdbootstrap-2.2-8.i386.rpm
    cp bootstrap_config.txt /var/tmp/upsupdbootstrap/prd/bootstrap/v2_2/configs/generic
    
  4. install upsupdbootstrap-generic-2.2-2.i386.rpm. This is just a set of scripts which move everything to the right directories, etc.
    rpm -i upsupdbootstrap-generic-2.2-2.i386.rpm
    
  5. make permissions on /projects/d0/* such that any member of the products group can write there. This saves you having to become user "products" to do any installations.
     
      chown -R products.products /projects/d0
      chmod -R g+w /projects/d0
    
  6. edit upd configuration to make upd aware of your 3 different databases (/projects/d0/ups, /projects/d0/usr/, /projects/d0/dist). A version of /projects/d0/ups/db/.updfiles/updconfig is provided here. This sets things up to automatically put D0RunII and D0RunII-bin products in the /projects/d0/dist/releases area and defines default location rules for other products as well. This also sets things up so that any member of the "products" group can write to any new area created by the installation of any given package (stolen from clued0 version).
    cp updconfig /projects/d0/ups/db/.updfiles/updconfig
    cp updconfig /projects/d0/usr/db/.updfiles/updconfig
    cp updconfig /projects/d0/dist/db/.updfiles/updconfig
    
  7. You can edit your ups configuration such that all three of your databases (/projects/d0/ups, /projects/d0/dist and /projects/d0/usr) use the right files. Copies of my dist ups config and ups ups config and usr ups config.
    cp ups-ups-dbconfig /projects/d0/ups/db/.upsfiles/updconfig
    cp usr-ups-dbconfig /projects/d0/usr/db/.upsfiles/updconfig
    cp dist-ups-dbconfig /projects/d0/dist/db/.upsfiles/updconfig
    
    OK, ups/upd is now set up. Next you need to ensure that users typing "setup" get the ups/upd "setup" and not the system "setup". I suggest defining an alias either for yourself or for all users
    tcsh (alias in /etc/csh.cshrc)
    ----
    alias setup 'source /projects/d0/ups/etc/setups.csh; source ups setup \!*'
    
    bash (function in /etc/bashrc)
    ----
    setup(){
       source /projects/d0/ups/etc/setups.sh
       setup $@
           }
    
    This is cleaner than having the script sourced automatically whenever you login. Often the directory containing the UPS area is mounted from another machine and if it is down you still want to be able to login.

    Now you should be able to login, type "setup upd" and install some packages. I usually do a test listing of available versions of root

    upd list -a root
    
    and install one just to test that everything is ok eg.
    upd install root v3_05_04b -f Linux+2.4 -q GCC_3_1