Installing Lasso on CentOS 5
Officially, Lasso Professional is only supported on one flavor and version of linux: Red Hat Enterprise Linux 4. However, many Lasso users have opted to forego RHEL4, which requires a commercial support subscription, for its community supported twin, CentOS 4, despite the fact that it isn’t officially supported by LassoSoft. Because CentOS 4 is based on the same core code and designed to be 100% binary compatible with RHEL4, installing Lasso on either distribution is essentially an identical process. Marc Pope has provided an excellent set of quick start instructions for installing Lasso on CentOS 4 at LassoTech.
Unfortunately, Lasso is not supported on newer versions of either distribution, even though RHEL5 was released in March of 2007, and CentOS 5 followed in the next month. Given the length of time the 5 series has been available, along with the significant number of bug fixes and enhancements it contains over the previous releases, many users would like to run Lasso on CentOS 5. This article describes the steps I took to get Lasso Professional 8.5.5 running on a clean install of CentOS 5.2, both the most current releases, respectively, at the time of this writing.
Please note that I am far from a linux guru. To the extent that I have tested this setup so far, I have not seen any errors and performance has been on par with what I would expect for the given hardware and conditions, but it has, by no means, been exhaustively tested. Use this unsupported setup in a production environment at your own risk. I welcome any feedback which can improve, correct, or add to the instructions below. Good luck!
-
Install and update CentOS 5.2 as usual.
The details of installing the base operating system are beyond the scope of this article. Suffice it to say, if you are not comfortable installing Linux on your own, you probably do not want to install Lasso on it either. These instructions were created against clean installs of version 5.2. If you have upgraded from an earlier version of CentOS, you may find that you do not need to install some of the compatibility packages that I needed.
-
Become the Root User
As usual, you’ll need root privileges for many of these operations, so it’s easiest to just become the root user for the duration, rather than prefixing every command with “sudo.”
[prompt]# su root(enter the root password when prompted)
-
Install the latest JRE from Sun.
Download the latest Java Runtime Edition, or JRE, from java.sun.com and create a symlink to the i386 directory from within the “latest” directory, where Lasso looks for it. At the time of this writing, the latest version was 1.6.0 Update 11. You may wish to check for a newer version rather than using the link shown below.
[prompt]# wget http://javadl.sun.com/webapps/download/AutoDL?BundleId=26213 -O jre-6u11-linux-i586-rpm.bin [prompt]# chmod +x jre-6u11-linux-i586-rpm.bin [prompt]# ./jre-6u11-linux-i586-rpm.bin(type “yes” to accept the license agreement)
[prompt]# ln -s /usr/java/jre1.6.0_11/lib/i386/ /usr/java/latest/lib/i386 -
Install Missing/Deprecated X11 Libraries
Find and install xorg-x11-deprecated-libs-6.8.2-1.EL.33.i386.rpm. Afterwards, yum will show it as installed, but the Lasso RPM will still complain that a required package is missing. I used the deprecated package because the regular one overrides the mesa-based package that CentOS 5 uses by default, which causes problems with the windowing system and Gnome.
[prompt]# wget ftp://mirror.switch.ch/pool/3/mirror/centos/4.7/os/x86_64/CentOS/RPMS/xorg-x11-deprecated-libs-6.8.2-1.EL.52.i386.rpm [prompt]# rpm -ivh xorg-x11-deprecated-libs-6.8.2-1.EL.33.i386.rpmNote: On an otherwise identical system with the KDE desktop installed, we were able to install just libXp (via yum), which is the specific package from the deprecated X11 libs that is missing in CentOS 5′s X11 install, instead of using the deprecated libs. Apparently this has been a common problem with the new version of X11.
-
Install Older Version of OpenSSL
CentOS has OpenSSL 098a, but Lasso requires 097a. I did not have to uninstall the newer version to include the older one.
[prompt]# yum install openssl097a -
Install OpenLDAP Compatibility Layer
Lasso requires libldap-2.2.so.7, which is in an OpenLDAP Compatibility package:
[prompt]# yum install compat-openldap.i386 -
Symlink /etc/localtime To Your Time Zone
Lasso expects /etc/localtime to be a symlink to /usr/share/zoneinfo/[your zone], but it wasn’t, by default, on the machines I set up.
[prompt]# mv /etc/localtime /etc/localtime_bak [prompt]# ln -s /usr/share/zoneinfo/EST /etc/localtime -
Install LassoService and Documentation
Install the Lasso-Service and Lasso-Documentation RPM’s, but skip the Lasso Connector RPM since we need the 2.2 connector anyway. NOTE: Use –nodeps on the LassoService RPM to keep it from complaining about the xorg-x11-libs not being installed.
[prompt]# wget http://download.lassosoft.com/pub/Lasso85/Lasso_Pro_8.5.5_Lin.tar.gz [prompt]# tar -zxvf Lasso* [prompt]# cd Lasso\ Pro\ 8.5.5\ for\ Red\ Hat\ Enterprise\ Linux\ 4/ [prompt]# rpm -ivh --nodeps Lasso-Service*.rpm [prompt]# rpm -ivh Lasso-Documentation*.rpm -
Install Lasso Connector for Apache 2.2
Copy the connector out of Lasso’s Extensions folder into Apache’s modules folder, copy the config file into Apache’s conf directory, modify the httpd.conf file to include it, and restart Apache.
[prompt]# cd /usr/local/Lasso\ Professional\ 8/Extensions/Lasso\ Connector\ for\ Apache\ 2.2/ [prompt]# cp lasso8.conf /etc/httpd/conf/lasso8.conf [prompt]# cp Lasso8ConnectorforApache2.2.so /etc/httpd/modules/Lasso8ConnectorforApache2.2.so [prompt]# cd /etc/httpd/conf [prompt]# vi httpd.confPress “i” to enter insert mode, then add the following lines:
# Include Lasso config. Include conf/lasso8.confPress [esc] to enter command mode, then “:w” to write (save) the file, and “:q” to quit the vi editor. Next, start or restart apache:
[prompt]# /etc/init.d/httpd startOr, if Apache is already running:
[prompt]# /etc/init.d/httpd restart -
Add Unicode Properties Support to PCRE
Lasso’s [string_findregexp] and [string_replaceregexp] rely on the PCRE regular expression library. However, the version included in CentOS is missing “Unicode properties support”, which prevents you from using regular expressions which include \L, \l, \N, \P, \p, \U, \u, or \X. In order to fix this, you must download the source RPM for the PCRE library, edit the compilation options in its SPEC file, and rebuild it so that when you (re)install the RPM, it will include the missing Unicode properties support. Once that’s done, you’ll need to create a set of symlinks from where Lasso expects to find these libraries to where they actually get installed on your system.
Note: These instructions were written by Bil Corry as part of a discussion on Lasso Talk. To use them, you will need to have the “rpmbuild” tool and a compiler such as GCC installed on your system. If you did not choose to include these components when you installed CentOS, be sure to add them via yum before proceeding.
[prompt]# mkdir /usr/src/redhat [prompt]# cd /usr/src/redhat [prompt]# wget http://mirrors.kernel.org/centos/5.2/os/SRPMS/pcre-6.6-2.el5_1.7.src.rpm [prompt]# rpm -ivh pcre-6.6-2.el5_1.7.src.rpm [prompt]# cd /usr/src/redhat/SPECS/ [prompt]# vi pcre.specPress “i” to enter insert mode, find the “%configure” line and add the option for Unicode property support, so it looks like this:
%configure --enable-utf8 --enable-unicode-propertiesPress [esc] to enter command mode, then “:w” to write (save) the file, and “:q” to quit the vi editor. Next, rebuild the RPM with the new configuration option in place and install it:
[prompt]# rpmbuild -bb pcre.spec [prompt]# cd /usr/src/redhat/RPMS/i386/ [prompt]# rpm -Uhv pcre*.rpmFinally, replace the PCRE libraries in /usr/local/lib with symlinks to the versions in /usr/lib:
[prompt]# mkdir /usr/local/lib/pcre-old [prompt]# mv /usr/local/lib/libpcre*.* /usr/local/lib/pcre-old [prompt]# ln -s /usr/lib/libpcre.a /usr/local/lib/libpcre.a [prompt]# ln -s /usr/lib/libpcre.so /usr/local/lib/libpcre.so [prompt]# ln -s /usr/lib/libpcre.so.0 /usr/local/lib/libpcre.so.0 [prompt]# ln -s /usr/lib/libpcrecpp.a /usr/local/lib/libpcrecpp.a [prompt]# ln -s /usr/lib/libpcrecpp.so /usr/local/lib/libpcrecpp.so [prompt]# ln -s /usr/lib/libpcrecpp.so.0 /usr/local/lib/libpcrecpp.so.0 [prompt]# ln -s /usr/lib/libpcreposix.a /usr/local/lib/libpcreposix.a [prompt]# ln -s /usr/lib/libpcreposix.so /usr/local/lib/libpcreposix.so [prompt]# ln -s /usr/lib/libpcreposix.so.0 /usr/local/lib/libpcreposix.so.0 -
Start Lasso
In our testing, Lasso ran fine when started using any of the provided startup scripts, but it did not have sufficient permissions when started from Gnome’s Services control panel, resulting in ISE’s.
[prompt]# cd /usr/local/Lasso\ Professional\ 8/Tools/ [prompt]# sh ./startLassoService.shNote: The problem starting from the Services control panel is apparently due to the fact that Lasso wants to run a process as root in order to spawn other processes under the lasso user. In CentOS 5.2, by default, only console users can do this (hence the need to use the startup scripts). A potential workaround is to comment out this line in /etc/sudoers, though there are likely security implications in doing so:
Defaults requiretty
Other Notes
- This should be run against a test suite to determine if there are any other dependencies that may still be causing problems.
- In one test install, we saw a “file not found” error looking for “startup.LassoApp” vs. “Startup.LassoApp”, but doing a case-sensitive search on the source of the admin LassoApps didn’t produce any results, so I’m not sure where it’s coming from. On that machine, I made a copy of “Startup.LassoApp” with a lowercase “s.” I don’t know if having two otherwise identical startup scripts in place will cause any problems or not.
- It was brought to my attention that the lasso user’s shell is set to /dev/null, but that the standard for service accounts on CentOS is /sbin/nologin. It shouldn’t make any difference, but the perfectionists among you may wish to make that change.
- You may wish to add /usr/sbin to your user’s path, which gives you access to several handy shortcuts such as “apachectl” and “lasso8ctl”, among others, and also add your user to the /etc/sudoers file as an administrator. These two things will provide a more Mac-like experience without requiring you to log in as the root user.
- Depending on what choices you made when installing CentOS, some packages required by Lasso that were present in my installs may be missing from yours. If you follow these instructions and Lasso does not start up properly, try starting it in console mode (cd to the Tools directory and sh ./consoleLassoService.sh) and watch for error messages about missing files. One person reported that they had to install libxslt (yum install libxslt) in order to get Lasso running, whereas our test machines already had this package installed.
So, that’s it! Hopefully not too scary. If you try this, let me know how it goes. Once again, any suggestions for how to improve these instructions is welcome.
