Difference between revisions of "Desktop Setup"

From Vlsiwiki
Jump to: navigation, search
(Installation)
Line 76: Line 76:
  
 
  # Compatiblity packages
 
  # Compatiblity packages
  yum install -y compat-db compat-db compat-gcc-34 compat-gcc-34-c++ compat-gcc-34-g77 compat-glibc compat-glibc compat-glibc-headers compat-libf2c-34 compat-libgcc-296 compat-libstdc++-296 compat-libstdc++-33 compat-libstdc++-33 compat-readline43
+
  yum install -y compat-db compat-db compat-gcc-34 compat-gcc-34-c++ compat-gcc-34-g77 compat-glibc compat-glibc compat-glibc-headers compat-libf2c-34 compat-libgcc-296 compat-libstdc++-296 compat-libstdc++-33 compat-libstdc++-33 compat-readline43 openmotif
  
 
  # Ruby packages
 
  # Ruby packages

Revision as of 21:45, 25 November 2009

Distribution Setup

We support Red Hat compatible Linux distributions (CentOS, Fedora), but you need to maintain some security configuration and packages. Each distribution has its own problems, check the issues before deciding what distribution to install. The distributions should:

  • Compile and run SESC and SESCTherm (with CUDA support)


  • Run synos rake command
 svn co svn+ssh://mada0.cse.ucsc.edu/mada/server/svn/synos
 cd synos/scoore/fpu
 rake
  • Execute vcs
 cd synos/scoore/fpu
 rake test:softfloat_tb
  • Execute synplicity_pro
 cd synos/scoore/fpu
 rake fpga:fpu v=1
 ./synplify_fpu.sh
  • Execute dc_shell-t
 cd synos/scoore/fpu
 rake asic:fpu v=1
 ./dc_fpu.sh
  • Run opencv applications (cd mthd/mgesture)
  • Run gosu examples (cd mthd/hdui)

CentOS 5.2

WORKS

sesc,sesctherm, synos, vcs, synplify_pro, dc_shell, opencv

FAILS

* gosu (gem rmagic and ruby-opengl package fail to install)
* sshfs (userspace ssh filesystem mount utility)
* Most modern linux kde related apps

Installation

Install the 64bit packages selecting development and latex packages.

# Update the yum repository (EPEL packages)
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm
# Update distribution
yum update -y
# Editing packages
yum install -y aspell-en emacs openoffice firefox 
# Various fonts
yum install xorg-x11-fonts-100dpi-7.1-2.1.el5  xorg-x11-fonts-75dpi-7.1-2.1.el5 xorg-x11-fonts-ISO8859-1-100dpi-7.1-2.1.el5  xorg-x11-fonts-misc-7.1-2.1.el5  xorg-x11-fonts-truetype-7.1-2.1.el5
# Mathemathics packages
yum install -y R blas-devel gnuplot gsl-devel
# Version control and cmake
yum install -y cvs cmake git-all subversion
# SESC Development packages
yum install -y bison ctags cscope doxygen gcc gcc-c++ gcc-gfortran gcc-java m4 flex bison 
# Miscellaneous Development
yum install -y ant antlr boost-devel  fftw-devel vim-enhanced valgrind python-devel  qt4
# Compatiblity packages
yum install -y compat-db compat-db compat-gcc-34 compat-gcc-34-c++ compat-gcc-34-g77 compat-glibc compat-glibc compat-glibc-headers compat-libf2c-34 compat-libgcc-296 compat-libstdc++-296 compat-libstdc++-33 compat-libstdc++-33 compat-readline43 openmotif
# Ruby packages
yum install -y eruby-devel eruby-libs ruby-devel ruby-docs ruby-mode ruby-racc ruby-rdoc ruby-ri ruby-tcltk rubygem-rake rubygems
gem install --remote rspec
gem install rake rcov ruby-prof gecoder-with-gecode
# MT development
wget http://packages.sw.be/opencv/opencv-1.0.0-1.el5.rf.x86_64.rpm
wget http://packages.sw.be/opencv/opencv-devel-1.0.0-1.el5.rf.x86_64.rpm
rpm -i opencv*.rpm
yum install SDL_Pango-devel SDL_mixer-devel ImageMagick
gem install gosu
# Setup IP tables
Note: The iptables config file is only readable by root.  
# If you have root access a mascd machine:
   sudo scp mada0:/mada/server/setup/setup/iptables /etc/sysconfig/iptables

# If you only have sudo access on some mascdX machine:
#  ssh into that mascd machine, where X is the machine with the iptables file
   sudo cp /etc/sysconfig/iptables /tmp
   sudo chmod 777 /tmp/iptables
# Copy the file to your machine and restore correct permissions
   sudo scp madaX:/tmp/iptables /etc/sysconfig/iptables
   sudo chmod 600 /etc/sysconfig/iptables
# Lastly, erase the /tmp file on the mascdX machine, and restart iptables
#  ssh into it, rm /tmp/iptables
   sudo /etc/rc.d/init.d/iptables restart
# Setup services correctly
yum install -y chkconfig
scp mada0:/mada/server/setup/setup/setup.serv /root/setup.serv
for a in `grep "3:on" setup.serv  | cut -d0 -f1`; do chkconfig --level 3 $a on;  done
for a in `grep "3:off" setup.serv | cut -d0 -f1`; do chkconfig --level 3 $a off; done
for a in `grep "4:on" setup.serv  | cut -d0 -f1`; do chkconfig --level 4 $a on;  done
for a in `grep "4:off" setup.serv | cut -d0 -f1`; do chkconfig --level 4 $a off; done
for a in `grep "5:on" setup.serv  | cut -d0 -f1`; do chkconfig --level 5 $a on;  done
for a in `grep "5:off" setup.serv | cut -d0 -f1`; do chkconfig --level 5 $a off; done
# Setup automount
mkdir /mada
unalias cp
scp mada1:/etc/auto.master /etc/
scp mada1:/etc/auto.mada /etc
service autofs restart
# LDAP setup
scp mada1:/etc/ldap.conf /etc/
scp mada1:/etc/nsswitch.conf /etc
scp -r mada1:/etc/openldap/ldap.conf /etc/openldap/
scp -r mada1:/etc/openldap/cacerts/cert8.pem /etc/openldap/cacerts/

Fedora

WORKS

Fedora 10 x64 NOTE: most software is 64 bit, so make sure the x64 arch type is installed

    • Synplify Pro 9.62 is 32-bit. It needs:

a compatible libstdc++, tcl, qt To diagnose dependency problems: ldd /mada/software/synopsys/fpga_c200906/linux/mbin/synplify install by:

   sudo yum install -y compat-libstdc++-33-3.2.3-64.i386 compat-libstdc++-33-3.2.3-64.x86_64
   sudo yum install -y qt-4.4.3-15.fc10.i386 qt-x11-4.4.3-15.fc10.i386 tcl.i386 tcl.x86_64 nss_ldap-264-1.fc10.i386
   

Fedora 11:

   sudo yum install -y compat-libstdc++-33.i586 compat-libstdc++-33.x86_64 freetype-2.3.9-3.fc11.i586
   sudo yum install -y qt.i586 qt-x11.i586 fontconfig-2.7.1-1.fc11.i586 tcl.i586

Need this file, but problematic glib2-2.20.4-1.fc11.i586

DONE

    • VCS 2008-09 needs:

a compatible libstdc++ libtermcap

install by:

   sudo yum install -y compat-libstdc++-33-3.2.3-64.i386 compat-libstdc++-33-3.2.3-64.x86_64 libXt.i386
  # copy /lib64/libtermcap.so.2* from any mascd machine into your /lib64
  # then rebuild linker database:
  sudo ldconfig
  Note:  If using NFS mounted user directory, make sure to wipe out ./csrc directory (under which you invoke VCS) 
         you so that VCS rebuilds the design with the new GCC, otherwise it will not work.  This may
         become necessary if switching from Fedora to CentOS machines frequently.

DONE

  • LDAP setup (NEED Root of mascd2 or working FC machine)
  sudo yum install -y openldap-clients
  scp mascd2:/etc/ldap.conf /etc/
  scp mascd2:/etc/nsswitch.conf /etc
  scp -r mascd2:/etc/openldap/ldap.conf /etc/openldap/
  scp -r mascd2:/etc/openldap/cacerts/cert8.pem /etc/openldap/cacerts/
 
  run
  setup -> Authentication Configuration 
      User Information: 
          Cache Information
          Use LDAP
 
      Authentication:
          Use Shadow Passwords
          Use LDAP
          Local authorization is sufficient
      Next -> Finish
 
  Done
    
  • Setup automount
  yum install -y autofs
  mkdir /mada
  unalias cp
  scp mascd1:/etc/auto.master mascd1:/etc/auto.mada /etc/
  service autofs restart
  • Setup IP tables
Note: The iptables config file is only readable by root.  
# If you have root access a mascd machine:
   sudo scp mada0:/mada/server/setup/setup/iptables /etc/sysconfig/iptables

# If you only have sudo access on some mascdX machine:
#  ssh into that mascd machine, where X is the machine with the iptables file
   sudo cp /etc/sysconfig/iptables /tmp
   sudo chmod 777 /tmp/iptables
# Copy the file to your machine and restore correct permissions
   sudo scp madaX:/tmp/iptables /etc/sysconfig/iptables
   sudo chmod 600 /etc/sysconfig/iptables
# Lastly, erase the /tmp file on the mascdX machine, and restart iptables
#  ssh into it, rm /tmp/iptables
   sudo /etc/rc.d/init.d/iptables restart
  • GOSU (ruby OpenGL lib)

First install Ruby and the like...

  sudo yum install -y ruby-1.8.6.287-2.fc10.x86_64 ruby-libs-1.8.6.287-2.fc10.x86_64 rubygem-rake-0.8.3-1.fc10.noarch ruby-devel-1.8.6.287-2.fc10.x86_64
  sudo yum install -y rubygems-1.3.1-1.fc10.noarch ruby-rdoc-1.8.6.287-2.fc10.x86_64  ruby-mode-1.8.6.287-2.fc10.x86_64 ruby-irb-1.8.6.287-2.fc10.x86_64

Then Install SDL audio related stuff

  sudo yum install -y SDL-1.2.13-7.fc10.i386  SDL-1.2.13-7.fc10.x86_64  SDL-devel-1.2.13-7.fc10.x86_64 
  sudo yum install -y SDL_mixer-1.2.8-9.fc10.x86_64 SDL_mixer-devel-1.2.8-9.fc10.x86_64 SDL_mixer-1.2.8-9.fc10.i386 SDL_mixer-devel-1.2.8-9.fc10.i386
     

Finally Gosu itself

  cd /tmp 
  sudo gem install gosu


DONE


Other important Libraries

  1. PDF Printer
  This will create a pdf file in ~/, with spaces translated to underscores.
   sudo yum install cups-pdf
  1. Cadence Virtuoso
  Install some libraries...
  FC 10:
   sudo yum install csh ksh elfutils-libelf.i386 libXp.i386 libXt.i386
  FC11:
   sudo yum install csh ksh elfutils-libelf.i586 libXp.i586 libXt.i586
 * Note: font errors and locking assertions are warnings and are non-fatal.
  1. CUDA:
  Install nvidia driver, download 64 bit from nvidia.com
   sudo bash ./NVIDIA-Linux-x86_64-185.18.14-pkg2.run --no-x-check
 * Restart X server by logging out and back into X
  Install toolkit then SDK, download from nvidia.com
   sudo sh cudatoolkit_2.2_linux_64_fedora10.run
  
 * The SDK installs to your local home directory, so install as root 
   sh cudasdk_2.21_linux.run
  1. nxserver: (VNC like service)
  Install freenx, then copy ssh certificates
   sudo yum install freenx
   sudo scp YOUR_USER_NAME@mada0:/etc/openldap/cacerts/*dsa* /etc/nxserver/
   sudo /etc/rc.d/init.d/freenx-server restart
  1. nxclient - Linux:
  Install noMachine's nxClient, it's more refined then qtnx
   sudo rpm -i http://64.34.161.181/download/3.4.0/Linux/nxclient-3.4.0-5.x86_64.rpm
   Launch NX: 
    /usr/NX/bin/nxclient
   Import the client key after copying it to your desktop
    sudo cp /etc/nxserver/client.id_dsa.key ~/Desktop
    configure Key -> import -> Desktop/client.id_dsa.key
 Note: If the client displays the host's screen for 1 sec and quits, select gnome as the window manager in nxclient instead of kde.
  1. nxclient - Windows
   Install noMachine's nxClient
    http://www.nomachine.com/download-package.php?Prod_Id=1411
    ssh into host machine: 
    sudo cat /etc/openldap/cacerts/client.id_dsa.key
    copy the contents of that file COMPLETELY, from --BEGIN to --END
    create a new file using textpad named client.id_dsa.key.txt
    paste contents into file.
    NxClient -> configure Key -> import -> Desktop/client.id_dsa.key.txt
 Note: If the client displays the host's screen for 1 sec and quits, select gnome as the window manager in nxclient instead of kde.
Shortcuts
Keystrokes available in NX 3.x
CTRL+Alt+Shift+Esc to get rid of a not responding session
Ctrl + Alt + T to terminate a session
Ctrl + Alt + F to switch to fullscreen/windowed
Ctrl + Alt + M to minimize or maximize fullscreen window
Ctrl + Alt + arrow keys to viewport navigation
Ctrl + Alt + keypad arrow keys to viewport navigation
Ctrl + Alt + R to switch auto-resize/viewport mode.
Ctrl + Alt + E to toggle the lazy encoding
Ctrl + Alt + J to fix a visualization problem
Alt + F4 when the window manager is present, suspend or terminate a session
Ctrl + Alt + K  enable/disable the catching of Alt+Tab and Print Screen keys 

DONE

  1. Editing packages
   yum install -y aspell-en emacs openoffice firefox
  1. Matlab Specific packages
   yum install -y libXp
  1. Mathemathics packages
   yum install -y R blas-devel gnuplot gsl-devel
  1. Version control and cmake
   yum install -y cvs cmake git-all
  1. SESC Development packages
   yum install -y bison ctags cscope doxygen gcc gcc-c++ gcc-gfortran gcc-
   java m4 flex bison
  1. Miscellaneous Development
   yum install -y ant antlr boost-devel  fftw-devel vim-enhanced valgrind 
   python-devel  qt4

FAILS

KDE Unique settings on each Desktop / Server

  • We are going to create as many kde directories (settings only) as we want.
 If we have mascd1, mascd7, mada1  we want to have 3 unique kde directories
 
 Copy your original .kde directory into the new 'unique' ones
   cp -fR ~/.kde ~/.kde_mascd1
   cp -fR ~/.kde ~/.kde_mascd7
   cp -fR ~/.kde ~/.kde_mada1
  • Now that we have all the directories, add this to the bottom of your ~/.bashrc file
export hostn=`hostname |cut -f1 -d"."`
# If session is not NX, then normal kdehome for that client.
#  otherwise, use the nx desktop kde directory
if [ -z "$NXSESSIONID" ]
then
       export KDEHOME=~/.kde_$hostn
else
  export KDEHOME=~/.kde_`hostname |cut -f1 -d"."`nx
fi
#check if kde home directory exists, otherwise, set to default
if [ -f $KDEHOME ]
then
       export KDEHOME=~/.kde
fi


This script mainly works for use with NX sessions, it does not currently address being physically on multiple machines at once using KDE.

Sun Grid Setup

  1. Check if the machine is listed
qconf -sh
  1. Otherwise add it to the list
qconf -ah ????
  1. ssh to client (as root)
source /mada/software/setup.sh
cd /mada/users/sge
  1. add this to services
sge_qmaster     536/tcp
sge_execd       537/tcp
  1. Run installation (use default parameters)
./install_execd