Tuesday, December 27, 2011

Installing eclipse plugins for multiple users

These notes are primarily for myself because I can never freaking remember how to do this and I always lose my handwritten chicken scratch. If you happen to run across them and find them useful, then cool.

When an eclipse user installs plugins through Help Install New Software it puts the plugins in the user's local hierarchy. I had recently installed PDT, the PHP Development Toolkit for a single user and wanted to distribute it to a lab environment for multiple users.

  1. Fire up eclipse and make sure a valid repository is set at
    Window  Preferences  Install/Update  Available Software Sites
    
    Since I am running 3.7 (Indigo) I set it to
    http://download.eclipse.org/releases/indigo
  2. In the eclipse GUI install the plugin you want as a single user. For me this was
    Help  Install New Software  Programming Languages  PHP Development Tools
    
  3. Eclipse installs plugins in two directories features and plugins at ~/.eclipse/org.eclipse.yaddayadda/ where yaddayadda is some version specific string. For me this was platform_3.7.0_185596441.
  4. Go to that directory (the parent of features and plugins) and tar/gzip them up
    tar cf plugins.tar features plugins; gzip plugins.tar
  5. Distribute the file plugins.tar.gz to each machine or put it in a shared location. I put it in my web hierarchy and did a wget from each machine using clusterssh.
  6. Unzip it
    tar xzvf plugins.tar.gz
  7. Copy the contents of each folder to the location where eclipse is installed. For me this is in /usr/local/eclipse/ and then features and plugins. For me this was
    sudo cp -r features/* /usr/local/eclipse/features/
    sudo cp -r plugins/* /usr/local/eclipse/plugins/
    
  8. Make sure permissions are read for everyone. So I had to
    sudo chmod -R o+r *
    inside of the shared features and plugins directories.

No comments: