Forum OpenACS Q&A: FreeBSD, AOL Server 4 and OpenACS 5 (HEAD)

By way of a quick "works here":

  • FreeBSD 5-CURRENT from 16-Oct-2003
  • Tcl 8.4 from ports with threading enabled (see below)
  • AOL Server 4 beta 10 from SourceForge
  • tDOM 0.7.8
  • nscache, nssha1 from SourceForge
  • nspostgres and nsrewrite from CVS
  • OpenACS 5-HEAD from end of September (not too fresh, but this should not really matter, should it?)
  • PostgreSQL from ports (7.3.4)

Much of the process was aided by Vinod's OSX experience at http://kurup.org/openacs/mac-install

Particulars

General

Replace make with gmake in each reference on Vinod's page

Tcl

/etc/make.conf needs to include TCL_WITH_THREADS=yes or issue make in /usr/ports/lang/tcl84 as make -DTCL_WITH_THREADS all install clean (or use -m '-DTCL_WITH_THREADS' option to portinstall(1))

AOL Server

Run configure as: ./configure --with-tcl=/usr/local/lib/tcl84

nssha1

As per Vinod's (and actually as per current 3.x practice as well -- this really needs an #ifdef's) page — comment out lines 139 and 140 in nssha1.c

nspostgres

On top of what is on Vinod's page — also make sure that your environment sets PGLIB and PGINC to proper locations, or run make as: gmake PGLIB=/usr/local/lib PGINC=/usr/local/include POSTGRES=/usr/local/pgsql ACS=1

tDOM

unix/CONFIG should be modified thusly:

../configure --enable-threads --disable-tdomalloc \
--prefix=/usr/local/aolserver --with-tcl=/usr/local/lib/tcl84
(i.e. proper reference to Tcl libs).

After that — there was no problem bringing up an instance earlier running under 3.3ad13.

Collapse
Posted by Andrei Popov on
4.6.3 was also successfully moved and appears to work fine. In fact, in just about a second /usr/local/aolserver3 dir is about to be tar cvjf aolserver-bin-3.3ad13.tbz'ed!
Collapse
Posted by Andrei Popov on
One more check also successfull: a fresh 5-HEAD (checked out just 30 minutes ago) successfully installed on the same box.
Collapse
Posted by Andrei Popov on

Ooops... This must have been a bit premature :)

There seems to be some problem with acs-subsite, in particular with /register:

[04/Nov/2003:08:11:28][27171.135024640][-conn:test::1] Error: GET http://192.168.81.128:8999/register/?return%5furl=%2f
referred by "http://192.168.81.128:8999/"
No script or template found for page '/home/apopov/prj/HEAD/packages/acs-subsite/lib/login'
    while executing
"error "No script or template found for page '$__adp_stub'""
    invoked from within
"if !$errMsg { error "No script or template found for page '$__adp_stub'"}"
    (procedure "template::adp_parse" line 78)
    invoked from within
"template::adp_parse [template::util::url_to_file "/packages/acs-subsite/lib/login" "$__adp_stub"] [list return_url "${return_url}" no_frame_p "1" auth..."
    invoked from within
"append __adp_output [template::adp_parse [template::util::url_to_file "/packages/acs-subsite/lib/login" "$__adp_stub"] [list return_url "${return_url}..."
    ("uplevel" body line 17)
    invoked from within
"uplevel {
          set __adp_output ""

    set __adp_master [template::util::url_to_file "[ad_parameter -package_id [ad_conn subsite_id] DefaultMaster ..."
    (procedure "template::code::adp::/home/apopov/prj/HEAD/packages/acs-subs..." line 2)
    invoked from within
"template::code::${template_extension}::$__adp_stub"
    (procedure "template::adp_parse" line 68)
    invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
    (procedure "adp_parse_ad_conn_file" line 7)
    invoked from within
"$handler"
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
                $handler
            } ad_script_abort val {
                # do nothing
            }"
    invoked from within
"rp_serve_concrete_file [ad_conn file]"
    (procedure "rp_serve_abstract_file" line 60)
    invoked from within
"rp_serve_abstract_file "$root/$path""
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
        rp_serve_abstract_file "$root/$path"
        set tcl_url2file([ad_conn url]) [ad_conn file]

acs-subsite/lib/login is indeed missing in FS, and is included in /packages/acs-subsite/www/register/index.adp. Isn't it what was discussed soe time ago about putting templates/other resources into a separate hierarchy?

In either case, this does not constitute the failure of the general exercise in question.

Collapse
Posted by Andrei Popov on
One more typo noticed: tcl dirs should read 8.4 instead of 84 in all above paths.
Collapse
Posted by xx xx on
Collapse
Posted by Tyge Cawthon on
GREAT Instructions.  Below are some findings I discovered
and I would appreciate help.  Thanks in advance.

"Prepare AOLserver"
1. permission issue with /usr/local/aolserver/servers/server1/modules/nslog/access.log

changed from rw-r-r to 755.

Aolserver works but getting Warning: config.tcl: nsssl not loaded -- key/cert files does not exist.

Any suggestion why this is?

"Bring daemontools down: Test"

1. /usr/local/bin/svc -dx /var/lib/aolsever/service0/etc/daemontools
error: svc warning: unable to control. File does not exist.

2. /usr/local/bin/svstat/service/servic0
error: unable to chdir. File does not exist.

"Install with automated script"

1. ee /home/service0/install/install.sh
FYI -
change "." to ":" is line 427

Not sure what to do here and need help.
/home/service0/install/install.sh

ee /home/service0/install/install.tcl
I made the recommended changes under to install.tcl
example:
set server_host highlandpiping.net
set server_ip 69.212.248.18
set server_url -b  "http://${server_ip}:${server_port}"

Is this the correct format and method?
FYI - I own the IP and name.

Running install.sh, below are the results
I noticed that not all the variables appear.  Is this a problem? i.e.  "Using serverroot=,server_url=,....do_install=yes,"

I would appreciate any help.  Thanks in advance.

Thu Oct  7 19:03:56 EDT 2004: Starting installation with config_file ./install.tcl. Using serverroot=, server_url=, do_checkout=, do_install=yes, dotlrn=, and database=., use_daemontools=
Thu Oct  7 19:03:56 EDT 2004: Taking down
Thu Oct  7 19:03:56 EDT 2004: Issuing command
./install.sh: line 263: test: 0: unary operator expected
Thu Oct  7 19:03:56 EDT 2004: Recreating database user and database.
./install.sh: line 290: [: ==: unary operator expected
su: Sorry
./install.sh: line 326: [: ==: unary operator expected
Thu Oct  7 19:03:56 EDT 2004: Proceeding without checkout.  This assumes that you have a full working site already set up at , including correctly configured /etc/config.tcl and
Thu Oct  7 19:03:56 EDT 2004: Bringing  back up
Thu Oct  7 19:03:56 EDT 2004: Issuing command
./install.sh: line 473: test: 0: unary operator expected
./install.sh: line 491: [: ==: unary operator expected
Thu Oct  7 19:04:00 EDT 2004: Starting installation of OpenACS.
./install.sh: line 505: /tclwebtest: No such file or directory
Thu Oct  7 19:04:00 EDT 2004: Restarting
Thu Oct  7 19:04:00 EDT 2004: Issuing command
./install.sh: line 532: test: 0: unary operator expected
./install.sh: line 581: ${install_error_file}: ambiguous redirect

Collapse
Posted by xx xx on
Brian, I'm in a hurry, but here are some remarks:

1. Ignore "..nsssl not loaded.." or comment it out in your config.tcl file.
2. "I noticed that not all the variables appear.  Is this a problem?" No.
3. When you use "./install.sh" instead of "sh ./install.sh", it usually doesn't complain about "[: ==: unary operator expected" anymore.  If it still does change all "==" to "=" in install.sh (AFAIK Jade recently corrected it in CVS).
4."change '.' to ':' in line 427" probably means replace "chown -R service0.web ..." with "chown -R service0:web ..."
5. did you install tclwebtest?
6. Maybe others can comment on steps to be taken when daemontools doesn't work. Try search. There also seems to be a typo "servic0"
7. Try set deamontools to "no" in install.sh and set start_server_command "exec /usr/local/aolserver/bin/nsd-postgres -b ${server_ip}:${server_port} -it $serverroot/etc/config.tcl -u $aolserver_user -g $aolserver_group" (or better, just don't use install.sh)

Collapse
Posted by Tyge Cawthon on
Aldert - Thanks for your suggestions.

item 1 - closed
itme 2 - thanks for the information. Closed
item 3 - closed
item 4 - closed
item 5 - tclwebtest was/is installed.  I had to "hardcode" the pathname in the install.sh (line 505).  No longer an issue.
item 6 - Open.  The typo was in my message. Anyone?
item 7 - Open.  I changed the install.tcl file to your suggestions.  As you can see from below, I am still getting errors.

You suggested "better, don't use install.sh".
Could you please point me in the right direction. I am new and have been doing a lot of reading, but not sure which direction to go.  Once again thanks for all you help.

When I am finished with this, I hope to have a "complete" start to end documentation (error free) on how to load OpenACS on FreeBSD for people like me.

FYI - I looked at the install.sh file and went to each line to try to better understand the error messages below.

install.sh messages below here.
On your system, tclsh is installed under at least the following names:

tclsh8.4
Fri Oct  8 14:30:13 EDT 2004: Starting installation with config_file ./install.tcl. Using serverroot=, server_url=, do_checkout=, do_install=yes, dotlrn=, and database=., use_daemontools=
Fri Oct  8 14:30:13 EDT 2004: Taking down
Fri Oct  8 14:30:13 EDT 2004: Issuing command
./install.sh: line 263: test: 0: unary operator expected
Fri Oct  8 14:30:13 EDT 2004: Recreating database user and database.
./install.sh: line 290: [: =: unary operator expected
su: Sorry
./install.sh: line 326: [: =: unary operator expected
Fri Oct  8 14:30:13 EDT 2004: Proceeding without checkout.  This assumes that you have a full working site already set up at , including correctly configured /etc/config.tcl and
Fri Oct  8 14:30:13 EDT 2004: Bringing  back up
Fri Oct  8 14:30:13 EDT 2004: Issuing command
./install.sh: line 473: test: 0: unary operator expected
./install.sh: line 491: [: =: unary operator expected
Fri Oct  8 14:30:18 EDT 2004: Starting installation of OpenACS.
In FreeBSD, tclsh is named with a version number.  This is because
different versions of tclsh are not compatible with each other and
they can not all be called "tclsh"!  You may need multiple versions
installed because a given port may depend on a specific version.

On your system, tclsh is installed under at least the following names:

tclsh8.4
Fri Oct  8 14:30:18 EDT 2004: Restarting
Fri Oct  8 14:30:18 EDT 2004: Issuing command
./install.sh: line 532: test: 0: unary operator expected
./install.sh: line 581: ${install_error_file}: ambiguous redirect

Collapse
Posted by Tyge Cawthon on
I justed notice from the install.sh messages the line

"Fri Oct  8 14:30:13 EDT 2004: Proceeding without checkout.  This assumes that you have a full working site already set up at , including correctly configured /etc/config.tcl and"

I looked in my /etc directory I do not see a "config.tcl"

Could this be an issue?

Collapse
Posted by Jade Rubick on
Do we need another set of instructions for FreeBSD? Any reason these can't be integrated into the current docs? Is it a lot of work?

Here's how to add things to the official documentation:

https://openacs.org/faq/one-faq?faq_id=161579#197337

Collapse
Posted by Tyge Cawthon on
I would like to intergrate these changes into the "offical" documentation.

Once I get this system running, I will go back and re-check the documentation and re-install everything again.

So far, I see only very minnor changes for example:
Make notes that tar.gz files need to be either gzip -d or gunzip before using tar.

Also more detail around "trouble" shooting (ie semaphores).

Collapse
Posted by Torben Brosten on
Brian, there's enough significant changes to a freebsd install that I think you'll find it easier to complete those steps manually. I'm sending you my draft notes.

There are file location changes, and command changes.

for example:

bash-2.05b# pw groupadd service0
bash-2.05b# pw useradd service0 -d /home/service0 -g service0
bash-2.05b# pw usermod service0 -G web

performance tuning is significantly different.

I'm waiting for cvs access so the notes can be added to the docs.

Collapse
Posted by Tyge Cawthon on
Thanks Torben.  I will wait for those updated notes.
Collapse
Posted by Torben Brosten on
Hi, Brian. I sent them to you on Oct 8th. I'll resend now.
Collapse
Posted by Tyge Cawthon on
Torben, Thanks.  I got your e-mail with your information. I will be going through them this week.
Collapse
Posted by xx xx on
Brian, it would be great if you could make an effort to add FreeBSD to the official documentation. I hope Jade is willing to commit.

Please review the FreeBSD handbook, to enhance the current instructions and make them production ready. I'm willing to participate and review, BTW. (Who else is running FreeBSD in production and is willing to add enhancements to the instructions?)

With FreeBSD 5.3 being out (first 5.* production release) and FreeBSD being used by the most stable hosting providers (netcraft) it certainly deserves its place, IMO.

Collapse
Posted by Torben Brosten on
Thanks for the notice, Aldert.  Brian is finishing a separate document for installing Openacs on Freebsd 5. I'm planning to add the info back into the current docs by this weekend (now that I have cvs access =)
Collapse
Posted by xx xx on
Cross post to openACS port / installer:
https://openacs.org/forums/message-view?message_id=136910
Collapse
Posted by xx xx on
Correct cross post to openACS port / installer:
https://openacs.org/forums/message-view?message_id=240865
Collapse
Posted by xx xx on
Port is now in FreeBSD's ports collection:
https://openacs.org/forums/message-view?message_id=312823