SRSS 4.2 (part of SRS5) on Debian/unstable

From Sun Ray User Group Wiki

Jump to: navigation, search

Contents

Useful Links

Installation

Note 1: This is an installation on a 64-bit Debian (amd64 architecture).

Note 2: I only tested this on a headless server. There may be problems in this setup with non-SunRay X sessions.

  • Install some necessary packages:
apt-get install alien atftpd dhcp3-server  gdm   module-assistant tcsh \
pdksh  unzip tk8.6 gawk x11-xkb-utils ldap-utils libldap-2.4-2 xfonts-base \
libgdbm3  ia32-libs tomcat6 sun-java6-jdk iputils-ping wget libx11-6 libfreetype6 \ 
xfonts-base xfonts-100dpi xfonts-75dpi devscripts x11-xserver-utils debootstrap
  • Unpack SRSS into some temporary directory:
unzip srss_4.2_linux.zip
  • Convert the packages to 64 bit deb packages and install them:
cd srss_4.2
find . -name SUNW*.rpm -exec alien -d -g {} \;
find SUNW*-* -name control -exec sed -i "s/i386/amd64/g" {} \;
find SUNW*-*/ -maxdepth 0 -name "SUNW*-?.?" -exec sh -c "cd {} ; debian/rules binary-arch" \;
find . -name "sunw*deb" -exec dpkg -i {} \;
  • Unpack patch 140995-01 and install it:
unzip 140995-01.zip
cd 140995-01 
find . -name 'SUNW*.rpm'  -exec alien -d -g {} \;
find SUNW*-* -name control -exec sed -i "s/i386/amd64/g" {} \;
find SUNW*-*/ -maxdepth 0 -name "SUNW*-?.?" -exec sh -c "cd {} ; debian/rules binary-arch" \;
find . -name "sunw*deb" -exec dpkg -i {} \;
  • SRSS binaries are 32 bit only and we need additional 32bit libraries. The easiest way to get this is a 32bit chroot environment:
debootstrap --arch i386 sid /var/chroot/sid-ia32 http://ftp.debian.org/debian/
cp /etc/apt/sources.list /var/chroot/sid-ia32/etc/apt/
chroot /var/chroot/sid-ia32
echo "deb http://archive.debian.org/debian/ sarge main" >> /etc/apt/sources.list
apt-get update
apt-get install libmotif3  libxfont1 libgdbm3 sun-java6-jre libglib1.2
exit
echo "/var/chroot/sid-ia32/lib" >> /etc/ld.so.conf
echo "/var/chroot/sid-ia32/usr/lib" >> /etc/ld.so.conf
ldconfig

(For some stupid reason, /opt/SUNWut/lib/libusbut.so.1 needs glib1.2 which is deprecated for many years. Luckily, archive.debian.org exists.)

  • If you have no /etc/lsb-release file, generate it with
echo "DISTRIB_ID=Debian" > /etc/lsb-release
  • Download and apply some patches
wget -O  /tmp/Patch-SUNWkio42    http://wiki.sun-rays.org/images/9/9e/Patch-SUNWkio42.txt
wget -O  /tmp/Patch-SUNWutref42  http://wiki.sun-rays.org/images/e/e9/Patch-SUNWutref42.txt
wget -O  /tmp/Patch-SUNWut42a    http://wiki.sun-rays.org/images/5/51/Patch-SUNWut42a.txt
wget -O  /tmp/Patch-etc-initd    http://wiki.sun-rays.org/images/a/a4/Patch-etc-initd.txt
wget -O  /tmp/Pathc-etc-opt      http://wiki.sun-rays.org/images/4/43/Patch-etc-opt.txt
cd /opt
patch -p0 < /tmp/Patch-SUNWkio42
patch -p0 < /tmp/Patch-SUNWutref42
patch -p0 < /tmp/Patch-SUNWut42a
cd /etc
patch -p0 < /tmp/Patch-etc-initd
patch -p0 < /tmp/Pathc-etc-opt
  • Some more preparations:
mkdir /var/dt
rm -f /etc/opt/SUNWut/gmSignature
touch /etc/opt/SUNWut/gmSignature
chmod 600 /etc/opt/SUNWut/gmSignature
ln -s /var/chroot/sid-ia32/usr/lib/jvm/java-6-sun/jre   /etc/opt/SUNWut
mkdir /etc/sysconfig
echo -e "DHCPD_CONF_INCLUDE_FILES\nDHCPD_INTERFACE" >/etc/sysconfig/dhcpd
cd /etc/init.d
rm utsvtreg 
chmod 755 zsunray-init 
update-rc.d zsunray-init defaults
wget -O /etc/X11/Xsession.d/10SUNWut http://wiki.sun-rays.org/images/d/d5/10SUNWut.41b.sh
  • Workaround for Sun Java's problem with IPv6 [1]
sed -i 's/net.ipv6.bindv6only\ =\ 1/net.ipv6.bindv6only\ =\ 0/' /etc/sysctl.d/bindv6only.conf
invoke-rc.d procps restart
  • SRSS seems not to work with tomcat6, so we install the tomcat5.5 version coming with SRSS
cd /opt
tar xvzf <where you unpacked SRSS>/srss_4.2/Supplemental/Apache_Tomcat/apache-tomcat-5.5.20.tar.gz 
ln -s /opt/apache-tomcat-5.5.20 /opt/tomcat55
  • Use Debian's module-assistant to prepare the system for kernel module builds:
m-a -t prepare
  • Patch and build the kernel modules
wget -O  /tmp/Patch-utio   http://wiki.sun-rays.org/images/1/11/Utio.MR20090816.patch.txt
wget -O  /tmp/Patch-utadem http://wiki.sun-rays.org/images/e/e8/Utadem.MR20090816.patch.txt
wget -O  /tmp/Patch-utdisk http://wiki.sun-rays.org/images/4/43/Utdisk-4.2-ubuntu910.txt
cd /usr/src/SUNWut
patch -p0 < /tmp/Patch-utio
patch -p0 < /tmp/Patch-utadem
patch -p0 < /tmp/Patch-utdisk
make -C /usr/src/SUNWut/utadem clean default install
make -C /usr/src/SUNWut/utio  clean default install
make -C /usr/src/SUNWut/utdisk clean default install
depmod -a
  • The following will create some symlinks, patch some files in /etc/pam.d/ and patch /etc/gdm/custom.conf:
/etc/init.d/utsyscfg start

/etc/gdm/custom.conf should now include at least the lines

[daemon]
# SUNWut BEGIN - do not edit
VTAllocation=false
DynamicXServers=true
Greeter=/usr/lib/gdm/gdmgreeter
RebootCommand=
HaltCommand=
XKeepsCrashing=/etc/opt/SUNWut/gdm/XKeepsCrashing.sunray
# SUNWut END

If you don't want gdm to start an X server at the server console, then add the lines

[servers]
0=inactive

Since an existing /etc/gdm/gdm.conf has priority over /etc/gdm/custom.conf, we move it away

mv /etc/gdm/gdm.conf /etc/gdm/gdm.conf.bak
ln -s /etc/gdm/custom.conf /etc/gdm/gdm.conf
  • Enable USB mounts, see [2]
ln -s /opt/SUNWut/lib/libutdev.so.1 /usr/lib;  ldconfig
  • If you have not already configured the DHCP-server on your machine for other clients, you should empty the current config, so the Sun Ray Server Software adds its entries to a clean config and not the debian example one:
mv /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf.sample; touch /etc/dhcp3/dhcpd.conf 

If you have already configured a dhcp-server, make a backup-copy of your old config, just in case.

You can now configure the server with /opt/SUNWut/sbin/utconfig and /opt/SUNWut/sbin/utadm. See the SRSS documentation for possible options. When you want to use the SRSS Web administration tool and utconfig asks for the "Apache Tomcat installation directory", answer /opt/tomcat55.

The utadm script should have added some lines to your /etc/dhcp3/dhcpd.conf. It will now look like:

include "/etc/opt/SUNWut/net/dhcp/SunRay-options";
include "/etc/opt/SUNWut/net/dhcp/SunRay-interface-eth2";
  • XKB data: we use the XKB data provided by SRSS in /opt/SUNWut/lib/xkb/, add all files from /usr/share/X11/xkb/ which are missing (but don't overwrite files already existing in /opt/SUNWut/lib/xkb/) and provide this mixture of files both as /opt/SUNWut/lib/xkb and as /usr/share/X11/xkb.
cp -a /opt/SUNWut/lib/xkb /opt/SUNWut/lib/xkb.bak
mv /usr/share/X11/xkb /usr/share/X11/xkb.bak
cp -an /usr/share/X11/xkb.bak/* /opt/SUNWut/lib/xkb/
rm -rf /opt/SUNWut/lib/xkb/compiled
ln -s /var/lib/xkb /opt/SUNWut/lib/xkb/compiled
ln -s /usr/bin/xkbcomp /opt/SUNWut/lib/xkb/xkbcomp
ln -s /opt/SUNWut/lib/xkb /usr/share/X11/
  • Audio support via Pulseaudio
 apt-get install pulseaudio pulseaudio-module-gconf pulseaudio-module-x11  gstreamer0.10-pulseaudio \
 pulseaudio-esound-compat libasound2-plugins

Create a global 'utpulse.pa' file in /opt/SUNWut/lib with the following content

load-module module-oss device=UTAUDIODEV playback=1 record=0 fragment_size=8192
load-module module-native-protocol-unix

Create a pulseaudio setup script '66SUNW-pulseaudio' in /etc/X11/Xsession.d with the following content:

set +e
pkill -U $USER esd
pkill -U $USER pulseaudio
set -e

unset LD_PRELOAD

if [ "${UTAUDIODEV}" != "" ] ; then

  if [ ! -d ${HOME}/.pulse ] ; then
    mkdir ${HOME}/.pulse
  fi

  # create pulseaudio configuration for utaudio
  PULSECONF=${HOME}/.pulse/default.pa
  sed "s|UTAUDIODEV|$UTAUDIODEV|g" /opt/SUNWut/lib/utpulse.pa > ${PULSECONF}

  # create asoundrc for pulseaudio redirection
  ASOUNDRC=${HOME}/.asoundrc
  echo -n > ${ASOUNDRC}
  echo "pcm.!default { " >> ${ASOUNDRC}
  echo "  type pulse" >> ${ASOUNDRC}
  echo "}" >> ${ASOUNDRC}
  echo "ctl.!default { " >> ${ASOUNDRC}
  echo "  type pulse" >> ${ASOUNDRC}
  echo "}" >> ${ASOUNDRC}
else
  if [ -d ${HOME}/.pulse ] ; then
    rm -f ${HOME}/.pulse/default.pa
  fi
fi
  • Activate the XKB extension and the XRender extension of the Sun Ray X server
/opt/SUNWut/bin/utxconfig -a -k on
/opt/SUNWut/bin/utxconfig -a -n on
  • Now we can start the SRSS with the following commands
/etc/init.d/gdm restart
/etc/init.d/zsunray-init stop
/etc/init.d/zsunray-init start


Installation of the Sun Ray Connector for Windows and patch 143216-02

unzip  srwc_2.2_linux.zip
cd srwc_2.2/
find . -name "SUNW*.rpm" -exec alien -d -g {} \;
find SUNW*-* -name control -exec sed -i "s/i386/amd64/g" {} \;
find SUNW*-*/ -maxdepth 0 -name "SUNW*-?.?" -exec sh -c "cd {} ; debian/rules binary-arch" \;
find . -name "sunwuttsc*deb" -exec dpkg -i {} \;
cd  
unzip  143216-02.zip
cd 143216-02/
find . -name "SUNW*.rpm" -exec alien -d -g {} \;
find SUNW*-* -name control -exec sed -i "s/i386/amd64/g" {} \;
find SUNW*-*/ -maxdepth 0 -name "SUNW*-?.?" -exec sh -c "cd {} ; debian/rules binary-arch" \;
find . -name "sunwuttsc*deb" -exec dpkg -i {} \;
/opt/SUNWuttsc/sbin/uttscadm -c

When the last command asks for the location of libcrypto.so.0.9.7, answer /usr/lib32/libcrypto.so.0.9.8

Tips and Tricks

For some additional tips have a look at the SRSS on Ubuntu - Tips and Tricks section in this wiki.

Problems and Solutions

The Webadmin interface does not allow to terminate sessions or to initiate restarts: "An internal error occured"

Edit the file /opt/SUNWut/lib/prototype/inetd.conf.SUNWut.prototype and change "tcp6" to "tcp". After that, a cold restart "/opt/SUNWut/sbin/utrestart -c" is necessary. (Yes, SRSS is an encroaching beast. It rewrites /etc/inetd.conf not only during installation but during every cold restart.)

Personal tools