Topic: Solaris 10: Installing Required Software

Topic type:

Details of installing the required software for Kete on Solaris 10 - Work in progress

Out of Date! Needs a maintainer? Can you help bring this up to current Kete release? Please contact us in comments below!

This section for Solaris 10 is still in the works for Kete 1.1 and any contributions by solaris users, in areas such as obtaining a working copy of Git, would be much appreciated.

Part of the Installation Guide

Install Required Software for Running Kete

These are notes made during the installation of the Kete dependent software on Solaris and will be refined as time permits.

The following requires root access (or a user with the equivalent privileges) unless otherwise specified.

All components that need to be compiled from src will be installed using /usr/local as a base so as not to conflict with other components installed as part of the standard Solaris package management process. It also makes it easier to remove it later if required. 

Notes on Sun Complier Installation (required to compile native libraries for mongrel etc)

Download the Sun compiler collection from the Sun download site

bash# su -
root@host:# cd /var/tmp
root@host:# bunzip2 -dc /path/to/downloaded/ | tar xf -
root@host:# ./installer -nodisplay

Use the -nodisplay option if installing in a non-graphical environment. Follow the prompts and accept the defaults unless otherwise required. The installation process makes the compiler commands available via /usr/bin

Notes on Installing Ruby and Rails

Install the following packages from the Solaris Blastwave repository. This requires that the blastwave base package is installed and configured which is all detailed on the blastwave site. These all came from the unstable branch of the repository mirror in AUS:

  • sudo
  • subversion
  • imagemagick
  • mysql5
  • libmhash
  • memcached
  • ruby
  • rubygems

Add the kete user to the list of users able to sudo and update the gem installation and install rails

bash# su -
root@host:# vi /opt/csw/etc/sudoers
root@host:# export PATH=/opt/csw/bin:$PATH
root@host:# gem install rubygems-update
root@host:# gem update --system
root@host:# gem install rails
root@host:# gem install mongrel mongrel_cluster
root@host:# gem install memcache_client

Zoom GEM Installation

Note from Walter: Shouldn't this be after the YAZ installation?

When attemting to install the zoom gem it fails to complete due to some errors building the native extenstions. I can be built/installed using the following workarounds:

root@host:# gem install zoom

This will download the gem and attempt install it. It will most likely fail compaining about a missing header, cd into the src of the gem and make the following changes: 

root@host:# export LD_LIBRARY_PATH=/usr/local/lib
root@host:# export PATH=/usr/ccs/bin:$PATH
root@host:# cd /opt/csw/lib/ruby/gems/1.8/gems/zoom-0.4.1
root@host:# rake clean
root@host:# rm src/gem_make_out
root@host:# vi src/extconf.rb

Comment out the following lines

#unless have_header('yaz/zoom.h')
#  $stderr.puts 'yaz zoom header not available'
#  break

root@host:# vi Rakefile
Change the need_tar flag to false since the flags are different on default Solaris tar command

pkg.need_tar = false
root@host:# rake
root@host:# gem install pkg/zoom-0.4.1.gem

ImageMagick installation 

The ruby gem for imagemagick requires a more recent version of imagemagick (v6.3.x) than is in the blastwave respository (currently v6.2.9), so it needs to be compiled from source. This requires removing the blastwave version (so that it does not conflict with the newer version), downloading the source and configuring/compiling (based on details on RMagick site):

bash# su -
root@host:# export PATH=/opt/csw/bin:/usr/ccs/bin:/usr/local/bin:$PATH
root@host:# export LD_LIBRARY_PATH=/usr/local/lib
root@host:# pkgrm CSWimagemagick
root@host:# mkdir /usr/local/src
root@host:# cd /usr/local/src
root@host:# wget
root@host:# bunzip2 -dc ImageMagick-6.3.9-10.tar.bz2 | tar xf -
root@host:# cd ImageMagick-6.3.9
root@host:# ./configure --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8
root@host:# make

If everything has gone OK with the compile then the ImageMagick binaries and libraries can be installed (which by default will end up under /usr/local):

root@host:# make install

Now Install RMagick GEM

root@host:# cd ..
root@host:# wget
root@host:# gzip -dc RMagick-2.2.2.tar.gz | tar xf -
root@host:# cd RMagick-2.2.2

Run the setup command to configure and build RMagick

root@host:# export CFLAGS=-I/opt/csw/include
root@host:# ruby setup.rb setup

You may get some errors during interface testing, things are OK as long as it compiles. Next install RMagick

root@host:# ruby setup.rb install

Notes on YAZ and Zebra Installation 

bash# su -
root@host:# export PATH=/opt/csw/bin:/usr/ccs/bin:$PATH
root@host:# cd /usr/local/src
root@host:# wget
root@host:# gzip -dc yaz-2.1.54.tar.gz | tar xf -
root@host:# cd yaz-2.1.54
root@host:# ./configure --prefix=/usr/local
root@host:# make

If everything has gone OK with the compile then the yaz binaries and libraries can be installed:

root@host:# make install
root@host:# cd ..
root@host:# wget
root@host:# gzip -dc idzebra-2.0.6.tar.gz | tar xf -
root@host:# cd idzebra-2.0.6
root@host:# ./configure --prefix=/usr/local --with-yaz=../yaz-2.1.54
root@host:# make

If everything has gone OK with the compile then the yaz binaries and libraries can be installed:

root@host:# make install

Notes on Nginx Installation

Grab the latest tarball from and do the following (adjust version numbers accordingly).

root@host: # cd /usr/local/src
root@host: # wget
root@host: # tar xvfz nginx-0.5.35.tar.gz
root@host: # cd nginx-0.5.35
root@host: # export LD_LIBRARY_PATH=/opt/csw/lib
root@host: # export CC=cc
root@host: # ./configure --prefix=/usr/local/nginx
root@host: # make
root@host: # make install

Notes in MySQL configuration

As part of the blastwave package installation, the post install script creates an entry in the Solaris SMF database ready to be enabled:

## Executing postinstall script.
Configuring service in SMF
MySQL 5 is using Service Management Facility.  The FMRI is:
No database directory found in the default location.
If you need to build the initial database directory,
  see /opt/csw/mysql5/share/mysql/quick_start-csw
If you are using a non-default database directory location,
  please start mysql manually.

Build the MySQL database using the above mention script (changing default options as required) then enable the database to start automatically when Solaris boots: 

root@host: # /opt/csw/mysql5/share/mysql/quick_start-csw

Kete Specific Setup - MySQL

Make utf8 the default by editing /opt/csw/mysql5/my.cnf and adding this in the [mysqld] section:

init-connect = SET NAMES utf8
character-set-server = utf8

Start MySQL Server 

root@host: # svcadm enable svc:/network/cswmysql5:default

You can confirm that required charset variables now point at utf8 by connecting to the mysql database as mysql root (remember you set that password above) and running:

SHOW VARIABLES LIKE 'character_set%';

Aside from file system and dir, everything else should be utf8.

Notes on a user to run the kete application

Create/edit a .profile file in the users home directory with the following details added:

export PATH

Notes on settingup Memcached as a Solaris service

Complete details on setting up memcached as a Solaris service is described in following blog entry

Notes on setting up Nginx as a Solaris service

Use the exmple from the following blog entry as the basis for the Nginx compiled and installed earlier.This requies that the paths be updated to reflect the path of the main nginx binary and configuration file.


Apache with Passenger/Mod_Rails and REE on Solaris as an alternative to Mongrel with Nginx

It is now possible to use Apache with Passenger and REE (the preferred Kete set up at this time) on Solaris.  However, we don't have detailed instructions.  Please add them if you have them.  We're also looking for details on X-Sendfile on Solaris.


Next step:
Setting Up the Environment

Discuss This Topic

There are 1 comments in this discussion.

Read and join this discussion

join this discussion


Creative Commons Attribution-Share Alike 3.0 New Zealand License
Solaris 10: Installing Required Software by Mark de Reeper is licensed under a Creative Commons Attribution-Share Alike 3.0 New Zealand License