Project

General

Profile

Preparing a Linux machine for Bilder » History » Revision 2

Revision 1 (Redmine Admin, 10/30/2015 04:16 PM) → Revision 2/86 (Matt Copper, 12/30/2015 04:55 PM)

# Preparing a Linux machine for Bilder 

 ## Bilder on Linux 

 At least one package (Babel) needs Oracle's java, so we recommend installing it. It is often useful to get a newer gcc that has mmintrinsics. 

 ## GCC 

 Below are the instructions for building gcc-4.9.3. 

 ### Make sure 32bit glibc-devel is installed 

 ~~~~~~ 
 yum -y install glibc-devel.i686 
 zypper install glibc-devel-32bit    (SLES 11 SP3) 
 ~~~~~~ 

 ### Get the source packages 

 ~~~~~~ 
 export GCCVER=4.9.3 
 wget ftp://ftp.gnu.org/gnu/gcc/gcc-${GCCVER}/gcc-${GCCVER}.tar.bz2 
 ~~~~~~ 

 ### Build 

 Define CONTRIB_DIR to be your tarball installation directory, e.g., 

 ~~~~~~ 
 export CONTRIB_DIR=/contrib 
 ~~~~~~ 

 Usually CONTRIB_DIR=/contrib, but if one does not have root access, one has to put this in a user area. If one does have root access, one should execute the following commands: 

 ~~~~~~ 
 mkdir /internal /contrib /volatile 
 chmod 775 /internal /contrib /volatile 
 ~~~~~~ 

 Unpack gcc, go into the gcc source directory, and build according to the instructions below. 

 **gcc:** 

 ~~~~~~ 
 tar xjf gcc-${GCCVER}.tar.bz2 && cd gcc-${GCCVER} 
 ./contrib/download_prerequisites 
 mkdir build && cd build 
 ../configure --prefix=$CONTRIB_DIR/gcc-${GCCVER} \ 
   --enable-languages=c,c++,fortran --with-pic 
 env LD_RUN_PATH=$CONTRIB_DIR/gcc-${GCCVER}/lib64 make -j 4 
 make install 
 # Alias as desired. 
 mkdir -p $CONTRIB_DIR/bin && cd $CONTRIB_DIR/bin 
 ln -s $CONTRIB_DIR/gcc-${GCCVER}/bin/{c,g}* . 
 ~~~~~~ 

 ### Fix permissions 

 ~~~~~~ 
 chmod -R g+rwX $CONTRIB_DIR/gcc-${GCCVER} 
 chmod -R o+rX $CONTRIB_DIR/gcc-${GCCVER} 
 find $CONTRIB_DIR/gcc-${GCCVER} -type d -exec chmod g+rs '{}' \; 
 ~~~~~~ 


 ## Java 

 Install Oracle's Java. 

 Once it is installed, you will need to modify your path to include /usr/java/default/bin before /usr/bin or use the alternatives package: 

 ~~~~~~ 
 for i in java jar javac; do 
   alternatives --install /usr/bin/$i j$i /usr/java/jdk1.6.0_16/bin/$i 3 
 done 
 alternatives --config java # Pick 3 
 ~~~~~~ 

 On SLES , Install using the tar package from Oracle, then change into the installation directory 

 ~~~~~~ 
 for i in java jar javac; do 
   /usr/sbin/update-alternatives --install /usr/bin/$i $i <installation directory>/bin/$i 3 
 done 
 ~~~~~~ 

 where <installation directory\> is the absolute path to where Java was just installed   

 ## Version control systems 

 Make sure git, mercurial, and subversion are all installed. 

 ## LaTeX 

 Install the texlive-latex package. You may need to install other packages over time. For gui usage, see texworks: http://www.tug.org/texworks 

 If you cannot install in the system area, you can download 

 ~~~~~~ 
 wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz 
 tar xzf install-tl-unx.tar.gz 
 cd install-tl-20150411 (date might be different) 
 ./install-tl -no-gui 
 ~~~~~~ 

 This is now interactive, so set 

 * Scheme to basic 

 * TEXDIR = $CONTRIB_DIR/texlive 

 * Letter size 

 and then 

 ~~~~~~ 
     for i in cmap fancybox fancyvrb epstopdf framed mdwtools multirow parskip \ 
 pdftex revtex4 titlesec threeparttable url wrapfig courier ec helvetic palatino; do 
      tlmgr install $i 
     done 
 ~~~~~~ 

 You may also want to install some of the fonts, avantgar bookman charter cmextra courier euro-ce eurosym marvosym mathpazo ncntrsbk pxfonts rsfs symbol times txfonts utopia wasy zapfchan zapfding. 

 ## Fedora 

 The following packages are needed for Fedora 

 ~~~~~~ 
    bison 
    glib2-devel 
    gstreamer-devel 
    gstreamer-plugins-base-devel 
    libxml2-devel 
    openssl-devel 
    zlib-devel 
    patch 
 ~~~~~~ 

 If you cannot install in the system area, bilder/extras/gstreamer.sh may 
 be modified to do what you need. 

 ## Ubuntu 

 The following packages are needed for Ubuntu 

 ~~~~~~ 
    ace-netsvcs 
    bison 
    flex 
    gfortran 
    graphviz 
    graphviz-dev 
    heirloom-mailx 
    libblas-dev 
    libfreetype6-dev 
    libgl1-mesa-dev 
    libglu1-mesa-dev 
    liblapack-dev 
    libntlm0 
    libpng12-dev 
    libxext-dev 
    libxrender-dev 
    libxtst-dev 
    libzzip-dev 
    mailutils 
    python2.6 
    python2.6-dev 
    vim 
    zlib-dev 
 ~~~~~~ 

 The use of the following commands are helpful. To search for an available package dealing with a keyword, use: 

 ~~~~~~ 
     $ sudo apt-cache search keyword 
 ~~~~~~ 

 To install a particular package, use: 

 ~~~~~~ 
     $ sudo apt-get install libblah-dev 
 ~~~~~~ 

 Note: that development packages names typically end with "dev" not "devel" as in other flavors of linux. 

 ## Suse Linux Enterprise Server (SLES) 

 The following packages are needed on SLES 

 ~~~~~~ 
    bison 
    blas-devel 
    blas-devel-static 
    libblas3 
    flex 
    freetype2-devel 
    gcc 
    gcc-32bit 
    gcc-fortran 
    git 
    glibc-devel 
    glibc-devel-32bit 
    graphviz 
    graphviz-devel 
    gstreamer-0_10-devel 
    gstreamer-0_10-plugins-base-devel 
    lapack-devel 
    lapack-devel-static 
    liblapack3 
    libapr-util1 (needed to build subversion) 
    libapr1        (needed to build subversion) 
    libneon27      (needed to build subversion) 
    libpng-devel 
    libssh-devel 
    libxml2-devel 
    mailx 
    mercurial 
    Mesa-devel 
    python-devel 
    xorg-x11-devel 
    xorg-x11-libXext-devel 
    xorg-x11-libXrender-devel 
    xorg-x11-libs 
    zlib-devel 
 ~~~~~~ 

 To get blas-devel, blas-devel-static and lapack-devel, lapack-devel-static on SLES 11 SP3 , add the Science repository 

 ~~~~~~ 
    zypper addrepo http://download.opensuse.org/repositories/science/SLE_11_SP3/science.repo 
    zypper refresh 
    zypper install blas-devel blas-devel-static lapack-devel lapack-devel-static 
 ~~~~~~ 

 ## Vendor-specific version of graphics driver 

 If you are preparing a Linux machine for the VisIt Visualization package, the vendor-specific graphics driver for your graphics card should be installed. 

 By default, a generic graphics driver is installed.    On Fedora, the generic driver is "nouveau". 

 To determine if the nouveau driver is installed on your system, enter the command 

 ~~~~~~ 
      lsmod | grep nouv 
 ~~~~~~ 

 You will need to download and install the appropriate driver from your graphics card vendor.    This generally uninstalls the nouveau drivers.