Tag Archives: Lasso Professional

Lasso 8.6.x and 9.3.x Side by Side on CentOS 6.7

A good friend Johan Sölve was having some difficulty getting the two versions of Lasso to play together when working with images. It was published a few months back that on CentOS 6.7 that, they changed the default builds of ImageMagick from 6.5 to 6.7 and all binaries built against the older IM libs needed to be rebuilt against the newer. LP8.6 uses the 6.6 libs. Therein comes the question. How do you do that considering L9 uses IM6.7 and LP8.6 uses 6.6? It turns out it’s not too bad. I took all of the sweat out of it. From a high level perspective, you build the older IM in /usr/local and tell the OS to look there for the older binaries/libs. L9.3.x will continue looking at the default in /usr and then LP8.6.x picks up the new location upon restart and viola! Both work side by side using two different versions of IM.

Since the default location is in /usr, you can do yum update all day long and it won’t hurt the custom build you do in /usr/local.

From here out, this assumes you already have installed and initialized LP8.6 and L9.3.

I did this all as root but others may suggest differently. This works just fine as long as you are comfortable working as root. Let the fun begin!

# yum groupinstall "Development Tools"
# yum install bzip2-devel freetype-devel libjpeg-devel libpng-devel libtiff-devel giflib-devel zlib-devel perl-devel ghostscript ghostscript-devel djvulibre-devel libwmf-devel jasper-devel libtool-ltdl-devel libX11-devel libXext-devel libXt-devel lcms-devel libxml2-devel librsvg2-devel
# mkdir -p /usr/local/src
# cd /usr/local/src
# wget https://sourceforge.net/projects/imagemagick/files/old-sources/6.x/6.6/ImageMagick-6.6.5-10.tar.gz
# tar xzf ImageMagick-6.6.5-10.tar.gz
# cd ImageMagick-6.6.5-10
# ./configure --prefix=/usr/local --enable-shared=yes --enable-static=yes 
# make install 
# nano /etc/ld.so.conf

At the bottom add the line, if not already there, for /usr/local/lib and save the file (ctrl -o and ctrl-x).

# ldconfig 
# lasso8ctl restart

This should work as-is. If you see any compilation errors, you may want to make clean; make install again. You can try other versions of 6.6 but this one worked fine. I believe it contains the first iteration of the libMagickCore.so.4 and libMagickWand.so.4 which LP8.6.x requires. You may also want to use the ~lasso/Tools/consoleLassoService.sh to restart Lasso in console mode so you can make sure the ImageTag.so library was loaded. If so, you’re golden.

Now, for Apache, I keep it simple. Since there are two different versions of Lasso connectors, you need to implicitly tell Apache which one to use for each site.

In /etc/httpd/conf.d I create a file named "all_lasso.conf" which contains:

# Include the config for the site you want into each vhost declaration from the /etc/httpd/other
# directory to load the set handlers
<IfModule !lasso8_module>
        LoadModule lasso8_module modules/Lasso8ConnectorforApache2.2.so
</IfModule>
<IfModule !lasso9_module>
        LoadModule lasso9_module modules/mod_lasso9.so
</IfModule>

In /etc/httpd/conf.d delete the lasso8.conf and mod_lasso9.conf files. Create the folder in /etc/httpd/other. In this location you will create the following:
file: "lasso8.conf"

<Location ~ "^.*\.[Ll][Aa][Ss][Ss][Oo]$">
SetHandler lasso8-handler
</Location>
<Location ~ "^.*\.[Ll][Aa][Ss][Ss][Oo][Aa][Pp][Pp]$">
SetHandler lasso8-handler
</Location>

file: "mod_lasso9.conf"

<Location /lasso9>
SetHandler lasso9-handler
Order allow,deny
Allow from all
</Location>
# instance management requests are redirected to lassospitfire
<Location /lasso9/lux>
SetHandler lasso9-instancemanager
Order allow,deny
Allow from all
</Location>
Redirect 303 /lasso9/instancemanager /lasso9/lux
# requests ending with .lasso or .lasso9 are processed by lassoserver
<LocationMatch \.(?i:lasso9?)$>
SetHandler lasso9-handler
</LocationMatch>

This loads all the lasso modules when Apache starts and then uses the correct module for each site as it is implicitly selected. In each <VirtualHost ...></VirtualHost> you will use either:
Include /etc/httpd/other/lasso8.conf OR Include /etc/httpd/other/mod_lasso9.conf
Again, this tells Apache which Lasso connector to use for each site. Within these files you can globally set the file handlers such as .html if you want or you can set it within each vhost to be processed by Lasso.

Read more