Software development, photography, jokes, ....

noyb-logo

Sites by me

 
sds82-logo
tas-logoTransportation Administration System
snoezelkussen-logo-kleinstSnoezelen Pillows for Dementia
ikzoekeenbegeleider-logoBegeleiders voor gehandicapten
Laat uw hond het jaarlijkse vuurwerk overwinnen
Betuweroute en Kunst
logo 50x50Hey Vos! Je eigen naam@vos.net emailadres?
Kunst in huis? Nicole Karrèr maakt echt bijzonder mooie dingen
nettylogo2Kunst in huis? Netty Franssen maakt ook bijzonder mooie dingen

Hosting Favorites

 
ANU Internet Services
Netim
GoDaddy
XEL Media

Blogroll

 
Bomenstichting
Google Translate
PHP
MySQL
jQuery
jQuery UI
YourHead Stacks API
Favicon Generator.
Password Generator.
Check HTTPS problems


Marc's Place


 

 Install Lasso 9 (bèta; svn)

  On Mac OS X client

Go to Lassosoft.com for the latest stable release,
with a genuine installer:

2011: v9.1.4
2013: v9.2.4
2016: v9.3.1
2017: v9.3.2-b4

Parts of this page can be used as additional reference
material after the installation of the latest version.



The article below is based on Richard Taubo's article: Setting up Lasso 9 with SVN
and Marc Pinnell's article: Lasso 8 and 9 Side by Side on Same Server
and Bil Corry's instructions to install lp-lib
from which I copied a lot, if not all, and added my own findings.



Buy me a coffee-2


1.  First, remove old directories:

$ sudo rm -R /Library/Frameworks/Lasso9.framework
$ sudo rm /usr/local/bin/lasso*
$ sudo rm -R "/Library/Application Support/Lasso 9"
$ sudo rm -R "/Library/Receipts/Lasso 9"*
$ grep -i lasso /etc/apache2/users/* # should list only a possible lasso8.conf file. Leave it.
$ grep -i lasso /etc/apache2/other/* # could list a possible lasso9.conf file. Delete it.
$ grep -i lasso /etc/apache2/extra/* # could list possible entries in a vhosts.conf for lasso9. Edit the file and delete those entries.
$ grep -i lasso /etc/apache2/httpd.conf # should only list a DirectoryIndex entry


2.  Next, checkout the latest beta from the svn (if you get an error '-bash: svn: command not found', you need to install svn first):

$ cd /Applications
$ svn co http://download.lassosoft.com/svn/lasso/lasso9_beta/trunk lasso9_beta


3.  To be able to run lassoserver from everywhere, you need to define the environment variable LASSO9_HOME:

$ cd /etc
$ sudo vi profile


Add the line export LASSO9_HOME="/Applications/lasso9_beta" and save the file.

$ sudo vi csh.cshrc

Add the line setenv LASSO9_HOME "/Applications/lasso9_beta" and save the file.

$ sudo vi launchd.conf

Add the line setenv LASSO9_HOME "/Applications/lasso9_beta" and save the file.

4.  Exit all shells and reopen a new one. Type

$ set | grep -i lasso9

You should see the line LASSO9_HOME=/Applications/lasso9_beta.

5.  Next go into the Finder and open the folder /Applications/lasso9_beta/Installers. Unzip the file Lasso9Dependencies.osx.pkg.zip and double-click the extracted package. When that is done, go back to Terminal and type the following commands:

$ cd $LASSO9_HOME
$ cd installers
$ ./makelinks


6.  To be able to run Lasso 9 from everywhere, create links to the executables in /usr/local/bin, which should be in your PATH environment variable.

$ echo $PATH

should give something like /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/mysql/bin
To create the links, type the following commands:

$ cd /usr/local/bin
$ sudo ln -s /Applications/lasso9_beta/LassoExecutables/lasso9 .
$ sudo ln -s /Applications/lasso9_beta/LassoExecutables/lassoserver .


7.  The installation of Lasso 9 for use from the command line is now ready. To test it, type:

$ echo 'date' | lasso9 --

This should output a date-time combo like 2010-08-29 14:47:47.



8.  Now configure Apache 2 so it can serve Lasso 9 web pages. As people found out, LassoServer (beta!) cannot run as a www-user which Apache 2 runs as. To configure the correct user where Lasso 9 should run with, type the following command:

$ chmod u+s /Applications/Lasso9_beta/LassoExecutables/lassoserver

9.  LassoSoft provides a configuration file for Apache 2 and I copied that file into an Apache 2 directory from which .conf-files are included. Usually these are users or other, but to check if these are used in httpd.conf, do this:

$ cd /etc/apache2
$ grep -i "*.conf" httpd.conf
Include /private/etc/apache2/other/*.conf


I got only one line output which shows me that only from the directory other all .conf files are included at once. So I copied the lasso9.conf file in there:

$ cd /etc/apache2/other
$ sudo cp /Applications/lasso9_beta/Installers/lasso9.apache2.conf ./lasso9.conf


Note: the newer, normal installers install a mod_lasso9.conf file in /etc/apache2/other/.
But since on newer Mac OS X Server installations, like mine for example (10.7.5), the directory /etc/apache2/other/ is not being loaded anymore because in /etc/apache2/httpd.conf is written:

<IfDefine !MACOSXSERVER>
   Include /etc/apache2/other/*.conf
</IfDefine>


Note the ! (not-symbol), which means that the file /etc/apache2/other/mod_lasso9.conf’ is never loaded; because this is a MACOSXSERVER. In such a case, move the file from /etc/apache2/other/ to /etc/apache2/sites/, where it will always be loaded.

Since I want to keep Lasso 8 running on this machine, I need Lasso 9 parallel installed. It should not take over Lasso 8 (yet). Therefore I changed the .lasso association in the lasso9.conf file into .ls. Edit the lasso9.conf file:

$ cd /etc/apache2/other
$ sudo vi lasso9.conf


Change the .lasso association into .ls at the AddType statement:

AddType application/x-httpd-lasso9.ls

Next, look for the line starting with FastCGIServer and add the environment variable LASSO9_HOME (all in one line):

FastCGIServer /usr/local/bin/lassoserver -initial-env LASSO9_HOME=/Applications/lasso9_beta -initial-env LASSOSERVER_FASTCGIPORT=8999

Note: To change the extension for Lasso9 into .ls, edit the normal installed mod_lasso9.conf file and change the first line of this code:

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


into this:

<Location ~ "^.*\.[Ll][Ss]$">
   SetHandler lasso9-handler
</Location>


Save the file.

Now add the .ls extension to the DirectoryIndex in httpd.conf:

$ cd /etc/apache2/
$ sudo vi httpd.conf


Search for DirectoryIndex and you should find this piece of code:

<IfModule dir_module>
   DirectoryIndex index.html index.lasso index.php index.htm
</IfModule>


Add index.ls to the list, anywhere you like, but I advice before index.php, and save the file.

10.  Default, Lasso 9 serves only from the default web root, in this case /Library/Webserver/Documents/. For some reason, Apache cannot serve Lasso 9 pages from user's /Sites folders, without additional configuration. To enable this possibility, I did the following:

$ cd /etc/apache2/extra
$ sudo vi httpd-vhosts.conf


Add the following directives (note: you must add the virtual host localhost, if not there, otherwise things don’t work anymore):

<VirtualHost *:80>
   ServerName "localhost"
   DocumentRoot "/Library/WebServer/Documents"
</VirtualHost>

<VirtualHost *:80>
   ServerName "localuser"
   DocumentRoot "/Users/yourusername/Sites"
</VirtualHost>

<Directory "/Users/yourusername/Sites">
   Options Indexes FollowSymLinks MultiViews
   AllowOverride None
   Order allow,deny
   Allow from all
</Directory>


Save the file.

Next, add the host localuser to /etc/hosts, otherwise your web browser starts to look for localuser on the internet:

$ sudo vi /etc/hosts

Add the following line and save the file:

127.0.0.1        localuser


11.  Let Apache check its configuration files:

$ sudo apachectl configtest

If all is well, restart Apache 2 (should start lasso9, now):

$ sudo apachectl restart (or 'graceful' if you're on a production server)

Check Apache 2's error log:

$ tail /var/log/apache2/error_log

Should list some text like this:

SQLiteConnector using SQLite: 3.6.16
Creating JVM
Registering Admin
Starting fastcgi server on port 8999
Lasso Server running in DEVELOPER mode


12.  To test if Apache can serve Lasso 9 web pages, create a test.ls file in /library/webserver/documents/ and in /Users/yourusername/sites :

$ cd ~www/documents/
$ vi test.ls


Paste this code:

<html>
 <head>
 <title>Lasso_UniqueID</title>
 </head>

 <body bgcolor="white">
 [loop(10); lasso_uniqueid;'<br>'; /loop]
 </body>
</html>


and save the file.
Now call test.ls in a browser: http://localhost/test.ls or from your sites folder, like for example: http://localuser/test.ls

13.  If you get an error from Lasso that test.ls cannot be found, go into Terminal and edit the Apache conf file:

$ cd /etc/apache2
$ sudo vi httpd.conf


Then jump to the end of the file and remove any old Lasso 8 handler directives

Add the following two lines to the end of the file, if they are not already present and active:

NameVirtualHost *:80
Include /private/etc/apache2/extra/httpd-vhosts.conf


and save the file. Restart Apache 2:

$ sudo apachectl restart (or 'graceful' if you're on a production server)

and try to call test.ls again: http://localhost/test.ls to check if Lasso 9 now works.



14.  When there are updates for Lasso 9, just do:

$ svn update $LASSO9_HOME

15.  To enhance Lasso 9's functionality, Bil Corry implemented extra member tags, new tags or replaced existing ones with more or corrected functionality (all in one line):

$ svn checkout http://lp-lib.googlecode.com/svn/trunk/l9-lib/ $LASSO9_HOME/LassoStartup/l9-lib

After a few seconds you see output similar to this:

A LassoStartup/l9-lib/lp-l9-lib-lassoapp.lasso
A LassoStartup/l9-lib/lp-l9-lib-keyword.lasso
A LassoStartup/l9-lib/lp-l9-lib-staticarray.lasso
A LassoStartup/l9-lib/lp-l9-lib-string.lasso
A LassoStartup/l9-lib/lp-l9-lib-bytes.lasso
A LassoStartup/l9-lib/lp-l9-lib-math.lasso
A LassoStartup/l9-lib/lp-l9-lib-integer.lasso
A LassoStartup/l9-lib/lp-l9-lib-map.lasso
A LassoStartup/l9-lib/lp-l9-lib-util.lasso
A LassoStartup/l9-lib/lp-l9-lib-date.lasso
A LassoStartup/l9-lib/lp-l9-lib-client.lasso
A LassoStartup/l9-lib/lp-l9-lib-decimal.lasso
A LassoStartup/l9-lib/lp-l9-lib-array.lasso
A LassoStartup/l9-lib/lp-l9-lib-boolean.lasso
Checked out revision 58.


Instructions and examples on how to use these are inside the .lasso sources themselves. Restart Apache 2:

$ sudo apachectl restart (or 'graceful' if you're on a production server)

and try to call test.ls again: http://localhost/test.ls to check if Lasso 9 still works.

15.  When there are updates to l9-lib, just do:

svn update $LASSO9_HOME/LassoStartup/l9-lib



16.  The next step is to configure Lasso 9 Admin. Start a web browser and open the following page:

http://localhost/lasso9/admin/

Enter a username and password:

Write them down, click Create and you land in the Users page:



17.  Next, configure access to the local MySQL database server. Click on the vertical tab on the left and choose Datasources:



Select the MySQLDS datasource and click Add host and fill in the required fields and click the Add host button at the bottom-right:



18.  Note that the username & password here, are those configured in MySQL - not Lasso. You can manage the MySQL server with, for example, Navicat:



19.  Now verify that the database connection works. Click on MySQLDS and then on the configured host:



You should see all databases listed below that configuration:



Done!



19.  To add a second host, click on Add host:




20.  Add the second host as in step 17. You get an Internal Server Error alert window. Click ok. The host gets added. In my case, I ended up with two:



one which was incomplete qua tables. I deleted that peculiar one:




21.  When the new datasource (DS) has tables with identical names as in a DS that was already present prior to adding the new DS, Lasso9 creates aliases the same way as it does in Lasso8: it adds an asterisk to the table's name. As with Lasso8, you can change the alias' name:




Done!


buy me something-2
© 1997- Marc Vos (and others)   -   Privacy Statement   -    Contact Me

On this website, Google Analytics is used to track visitor statistics. These are anonymised data about the number of visitors, which pages they visit on this site, from which regions they visit, which web browsers they use, etc.. You will also see non-personalised ads via Google AdSense. Cookies from Paddle or Paypal are placed when you click on a 'Buy now!' or 'Donate!' button, and possible cookies from Disqus when you use that system to comment on one or more blogposts.
Privacy Statement