Forum OpenACS Q&A: Re: Unable to install openacs-5.9.0b2

Collapse
Posted by Gustaf Neumann on

You wrote

  • Since I am installing for testing and seeing, what OpenACS is, I just deleted the database and created it again, but with encoding SQL_ASCII instead of utf8.

You should not do this. Checkout the Database setup from the automated setup script from the wiki.

Did you install OpenACS "manually"? The referenced setup script is not tested under OpenBSD, but should work at least work as a blueprint.

After the setup the database definition should look like:

openacs.org=# \l
                                     List of databases
       Name       |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   
------------------+----------+----------+-------------+-------------+-----------------------
 postgres         | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 template0        | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
                  |          |          |             |             | postgres=CTc/postgres
 template1        | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
                  |          |          |             |             | postgres=CTc/postgres
 oacs-5-8         | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 
where Collate and Ctype might have different locales.

Concerning the other points:

  • error message showing up during bootstrap install: this is a known exception handed in the scripts, but still showing up in the logs. This should go away for the final release.
  • the quotes in the forums "plain text" mode is a bug and will be fixed before the release.
  • the missing empty line in "enhanced text" is a styling issue due to the used bootstrap theme at openacs.org, that should be as well addressed.

best regards
-gn

Collapse
Posted by Sophia Orthoi on

Encoding= SQL_ASCII, Colate=Ctype=C. Is this bad?!

What do you mean with installing manually?

I compiled postgresql, Tcl, tcllib, tDOM, naviserver, libthread, nsf/XOTcl 2.

I made user accounts acs and postgrsql with shell tcsh, 
home dirs: /usr/opt/acs and /usr/opt/postgres

I logged in acs and unpacked in its home "openacs-5.9.0b2/"

Logged in postgres, put in its home directory .tcshrc with

#setenv LC_CTYPE en_US.UTF-8
setenv PGDATA /usr/opt/pgsql/data

(note uncommented LC_TYPE) and did the commands:

# initdb
# createuser acs
# createdb -O acs acs

I edited the file "conf/openacs-config.tcl" that came with naviserver,
specially:

set server              "acs" 
set servername      "New OpenACS Installation - Development"

set serverroot          /usr/opt/acs/openacs-5.9.0b2
set logroot             $serverroot/log

set homedir             /usr/opt/nsrv
set bindir              $homedir/bin

I started naviserver as root with 

/usr/opt/nsrv/bin/nsd -u acs -t /usr/opt/nsrv/conf/openacs-config.tcl

I pointed my web browser at the adress "localhost:8080" that I gave in 
openacs-config.tcl.

I filled the maskes, openacs filled the db, and made I dont know what.

I restarted the server, and I had OpenAcs installed ... but not when
 "#setenv LC_CTYPE en_US.UTF-8" was uncommented. 

If the database has encoding utf8, I get the errors I told you in the 
first posting. Please, believe me.

No, I will not type comands that download and compile. I would type a
command in account acs that fill the database (but didnt find it).
And I have never installed something using the web browser, 
exept OpenACS. Unfortunately I had to guess what commands to type, 
the documentation is not clear.

Thanks again for your answer and best regards,
S.O.
Collapse
Posted by Sophia Orthoi on
I did not do something like:

psql -d acs -tAc \"create extension hstore\"

Is this necessary? Is perhaps this the reason of the problem with utf8?

Where is it documented exept hidden in the hidden script install-oacs.sh?

Regards,
S.O.

Collapse
Posted by Gustaf Neumann on

The hstore [1] extension is optional and is used by xowiki and xowf. It is recommended for large-scale xowf applications like the one described in [2]. hstore can also be installed at some later time, but it is more convenient to install it at install time. hstore is an indexing package and has nothing to do with "encoding" problems you are experiencing.

How is your "template1" databased defined? What was the createdb statement you were using? With a unicode "template1" there is no need to specify an encoding (-E parameter - but it should not hurt at all). What is the output of \l in psql?

The install and startup scripts set usually LANG and LC_ALL. What is your setting?

best regards
-gn

[1] http://www.postgresql.org/docs/9.0/static/hstore.html
[2] http://www.jisajournal.com/content/pdf/s13174-015-0030-8.pdf

Collapse
Posted by Sophia Orthoi on
It is, as I wrote above. I have no LC_CTYPE anymore, only ascii. With
 LC_CTYPE=US.UTF-8 I get problems.

postgres=# \l
                             List of databases
   Name    |  Owner   | Encoding  | Collate | Ctype |   Access privileges   
-----------+----------+-----------+---------+-------+-----------------------
 acs       | acs      | SQL_ASCII | C       | C     | 
 postgres  | postgres | SQL_ASCII | C       | C     | 
 template0 | postgres | SQL_ASCII | C       | C     | =c/postgres          +
           |          |           |         |       | postgres=CTc/postgres
 template1 | postgres | SQL_ASCII | C       | C     | =c/postgres          +
           |          |           |         |       | postgres=CTc/postgres
(4 rows)

Collapse
Posted by Sophia Orthoi on
Continuation, as in my post above:

# setenv PGDATA /usr/opt/pgsql/data
# initdb
# createuser acs
# createdb -O acs acs

Thanks for the link to the artcle.

S.O.

Collapse
Posted by Gustaf Neumann on
The default setup for PostgreSQL is usually utf-8 (at least under linux or Mac OS X). As PostgreSQL takes the default for template0 from the locale if possible, i wonder, how you initialized the database on this machine (with initdb). Did you initialize in your earlier attempt the DB with SQL_ASCII and defined later the "acs" database with UTF8? Using in initdb UTF8 is recommended.
-g

[1] http://www.postgresql.org/docs/9.4/static/app-initdb.html

Collapse
Posted by Sophia Orthoi on
"initdb" takes the encoding from LC_CTYPE, if not given with -E.

It takes the directory from PGDATA, if not given with -D.

This is why I changed LC_CTYPE in order not to have utf8.

As said before, if I have LC_CTYPE=en_US.UTF-8, I get the errors in my first posting.
Collapse
Posted by Sophia Orthoi on
Here the result with LC_CTYPE=en_US.UTF-8 set:

postgres=# \l
                                List of databases
   Name    |  Owner   | Encoding | Collate |    Ctype    |   Access privileges  
 
-----------+----------+----------+---------+-------------+----------------------
-
 postgres  | postgres | UTF8     | C       | en_US.UTF-8 | 
 template0 | postgres | UTF8     | C       | en_US.UTF-8 | =c/postgres          
+
           |          |          |         |             | postgres=CTc/postgres
 template1 | postgres | UTF8     | C       | en_US.UTF-8 | =c/postgres          
+
           |          |          |         |             | postgres=CTc/postgres
(3 rows)

But then I cannot install openacs.

Best regards,
S.O.
Collapse
Posted by Gustaf Neumann on
Citing from the postgres manual [1]

  • Note that the locale behavior of the server is determined by the environment variables seen by the server, not by the environment of any client. Therefore, be careful to configure the correct locale settings before starting the server. A consequence of this is that if client and server are set up in different locales, messages might appear in different languages depending on where they originated.

    Note: When we speak of inheriting the locale from the execution environment, this means the following on most operating systems: For a given locale category, say the collation, the following environment variables are consulted in this order until one is found to be set: LC_ALL, LC_COLLATE (or the variable corresponding to the respective category), LANG. If none of these environment variables are set then the locale defaults to C.

    Some message localization libraries also look at the environment variable LANGUAGE which overrides all other locale settings for the purpose of setting the language of messages. If in doubt, please refer to the documentation of your operating system, in particular the documentation about gettext.

I would recommend to set LANG at the creation of the database (to get a correct value for "Collate", see [2]) and in the environment running the server as indicated in the pg manual..

[1] http://www.postgresql.org/docs/9.4/static/locale.html
[2] http://stackoverflow.com/questions/30479607/explain-the-effects-of-export-lang-lc-ctype-lc-all

Collapse
Posted by Sophia Orthoi on
Well, with the ASCII encoding I have something, that may be an installation of openacs. I dont know. With utf-8 I was unable to install.

Before I continue experimenting with installation, I have a question: what does mean to install openacs?

First an experiment with words: what happens if I move from the postgresql data directory data to data.backup, make a new data directory with initdb, install or try to install openacs again, play a little with this installation, delete again data and move the old data.backup to data. Doing this, am I at the end in the same state as at the beginning?

Again, what does mean to install OpenACS? Where are only the database and the logfile changed or created, or happens more than that?

You know, I installed OpenACS to see what OpenACS is. I really dont know exactly what OpenACS is. But perhaps I will become an expert installing OpenACS. A concise and clear documentation about OpenACS and its installation would be a good thing, at best traditional man pages.

Have a nice sunday!
S.O.

Collapse
Posted by Gustaf Neumann on

The reason, why i am coming back to the encoding issue is that i have seen many OpenACS installations (100+) on different operating systems, but i have not seen these errors. i am just trying to help you, since when you work on with wrong encodings, you will run sooner or later into troubles. Most of the Web sites are today in UTF-8, Tcl supports UTF-8 natively, etc. In general, it should be possible to change the encoding at some later time [1], but i have not tried this.

installing OpenACS means: perform all necessary steps to run an OpenACS based web site. OpenACS consists of the so-called core-packages [1] and the application packages. about 90 of the packages are maintained.

In order to run OpenACS, one needs the following software components:

  • a web server (NaviServer, AOLserver)
  • a database (PostgreSQL, Oracle)
  • a few extra components (TDom, tcllib, XOTcl)
In order to Install OpenACS, one might have to install and configure the needed software components.
Then, one should get OpenACS either via tar or via source code repository. The recent tar files
contain just the oacs-core packages. Once, acs-core is installed (the step, where you saw in your
first attempt the error), one can install other OpenACS packages, either directly from the OpenACS repository,
of from the local file system (checkout from a source code repository). The latter is typical for developer,
developing their own packages, tailoring the system, etc.

The documentation of OpenACS needs much work, esp. for beginners. Once you have installed OpenACS,
you should also install the developer support, which provides the API browser. The developer support
is quite convenient to learn about the system, to see what templates are used in what situation, or
what SQL queries are executed for some URLs.

Does this help?
-g

[1] http://www.postgresql.org/message-id/20060329203545.M43728@narrowpathinc.com
[2] http://openacs.org/xowiki/packages

Collapse
Posted by Sophia Orthoi on
First of all I want to thank Benjamin and specially Gustaf for his pacience and tolerance to my critics. I want to answer the last question of Gustaf: yes, your answer helped, I installed the developer support, and I will try to read the developers guides, perhaps this helps, but it is not the way of beginners that not even know what the software is. My question about the meaning of installing is not answered, perhaps because it was not understood. To Benjamin: I dont think it is a permission issue, because the installation with ascii encoding worked, and also not issue with LD_LIBRARY_PATH for the same reason and because I know and recognize these problems. But before I continue trying, I need an answer to my question about the meaning of installing. I will restate it later, after I read more, not today. Thank you very much.

S.O.

Collapse
Posted by Sophia Orthoi on
Now I read a lot and got an idea of what openacs is. After reading a lot, I came to the conclusion that one must begin reading the documentation from chapter 15. When I "install openacs", I put in the file system a directory that I download and point the parameter "serverroot" in the configuration file of the server to it, then I start the server, start the browser, fill data in a form in the browser, and then it happens something. My question was: what is exactly this something? Only filling the database with tables and functions? Is the directory (serverroot) touched when this happens? For beginning again, is it enough to delete the directory created by initdb or must I reset something more than that?

Thanks
S.O.

Collapse
Posted by Gustaf Neumann on

The question is, at which level of detail you want to know, what the installer does. To make this answer short: In order to start over, there is no need to touch anything in the file system (under "serverroot").

From the point of view of OpenACS, it is sufficient to drop and recreate the database (commands "dropdb" and "createdb"), you are using.

if you want to setup the full postgres installation new (which i would recommend to get the usual template0 blueprint), you can use "initdb".

Collapse
Posted by Antonio Pisano on
Hello Sophia,

I will try to answer to your question about what OpenACS is: it is a framework for building web applications, that is, a collection of software tools that make "easy" (to a programmer skilled in web technologies) the construction of community based websites. Its runs on a webserver called Aolserver or Naviserver (different branches of what used to be the same software) and uses PostgreSQL as DBMS.

Other examples of frameworks similar to OpenACS that come to my mind are Plone and DJango, both for the Python language, or Meteor for Javascript. OpenACS uses the Tcl language instead (and one of its object oriented extensions, XoTcl).

OpenACS has a long tradition, dating back to 1995 when it was born as a company driven project in the United States. Its market share changed during the years and currently it is quite of a niche platform, but with solid poles of activity. To my knowledge, the most active ones are in Austria, South America and Italy. Its most common fields of applications are e-learning and ERP systems, but some (including myself) also develop some personal websites.

The reason why you found a bit difficult to start using OpenACS is that it doesn't show very much "out of the box". One should start developing something using the many commodities it offers, or install a package. Unfortunately, not many wizards exist to help you do so. Also, documentation intended for beginners, the one that usually "takes you by the hand" in your first steps in other projects, sometimes is lacking or outdated. OpenACS has a very clever built-in documentation system, but it supposes at least basic familiarity with the platform.

The best place to look for support is this forum, where response is usually very solicit. If you were looking for a software like this for a specific need, you could share it with us and people could give you more targeted advices.

I hope to have answered to your question

All the best

Antonio