wiki:Admin/StandardOperatingProcedures/InstallSoftwareFromSource

Version 7 (modified by Mikael Brandström Durling, 11 years ago) (diff)

--

Software install from source package as a module

  1. module load gridadmin
  2. module load module
  3. gridsw
  4. Dowload the software to /opt/sources
  5. Untar/unzip the source file (e.g. tar xzf sour-x.y.z.tar.gz)
  6. Create install dir, and populate with standard directories: mkdir -p /opt/sw/[package name]/[version] && ( cd /opt/sw/[package name]/[version] && mkroot -m ) In most cases it is enough to create the base directory, i.e. skip the second half including and after &&.
  7. Cd into source directory
  8. Configure and install software (e.g. for a typical package ./configure --prefix=/opt/sw/[package name]/[version]
  9. make
  10. make install
  11. Create a modulefile called /opt/modulefiles/[package name]/[version] by copying and editing from some other module file, for example. See man modulefile
  12. If this is the first version of the package installed add the whole package to svn by doing cd /opt/modulefiles/ && svn add [package name]
  13. If this is a new version installed just svn add the module file for the new version.
  14. Commit the change to svn, svn commit [modulefile or module directory] You will get a nano session to write a descriptive comment on what you have done. Check carefully that only the files you have modified are listed below the divider! If more files are there, quit the editor without saving any changes and make sure that you only give svn ci the files you want to commit.
  15. If some default version should be there, create/modify /opt/modulefiles/[package name]/.version to specify default. (Check the syntax in some other module directory). Don't forget to check in the .version file in SVN too.