From Fedora Project Wiki

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The GNU Enterprise Application Server is the core of the n-tier variant of the GNU Enterprise system. To the front end (be it GNUe Forms, GNUe Reports or any other tool), it provides user-definable business objects with arbitrary fields and methods.

Install gnue-appserver and gnue-forms -- as of 20010-01-20, these do not exist in Fedora.

$ sudo yum install gnue-appserver{,-doc} gnue-forms.

If it isn't already, install Postgresql as a database backend.

$ sudo yum install postgresql{,-server}

In the configuration file,

/var/lib/pgsql/data/postgresql.conf

uncomment the following line.

listen_addresses = 'localhost'

Edit Postgresql's host-based authentication file

/var/lib/pgsql/data/pg_hba.conf

and these 4 lines as the first entries.

host gnue_test gnue 127.0.0.1/32 trust
host gnue_test gnue 0.0.0.0/0 reject
host gnue_test gnue ::1/128 trust
host gnue_test gnue ::0/0 reject

Get Postgresql started.

$ sudo service postgresql initdb
$ sudo service postgresql start

Create a "gnue" user in Postgresql.

$ sudo -u postgres createuser -r --no-superuser --createdb --no-adduser gnue

GNUe can probably create databases, but you should probably just make one called "gnue_test".

$ sudo -u postgres createdb --owner=gnue gnue_test

Should you need Postgres to notice any changed settings in the pg_hba.conf, then reload Postgresql with this command.

$ sudo service postgresql reload

Use the sample connections.conf file

$ sudo cp /etc/gnue/{sample.,}connections.conf 

Edit the above file so that the "dbname" is "gnue_test"

dbname = gnue_test

and change the "provider" entry to "psycopg2".

provider = psycopg2

Initialize GNUe with the gnue-schema command.

$ gnue-schema -y /usr/share/gnue/appserver/gnue.gsd 
Updating schema ...
Updating data ...
  updating table 'gnue_module' ...
    Rows: 1 inserted, 0 updated, 0 unchanged.
  updating table 'gnue_class' ...
    Rows: 7 inserted, 0 updated, 0 unchanged.
  updating table 'gnue_property' ...
    Rows: 49 inserted, 0 updated, 0 unchanged.
  updating table 'gnue_procedure' ...
    Rows: 1 inserted, 0 updated, 0 unchanged.
  updating table 'gnue_parameter' ...
    Rows: 4 inserted, 0 updated, 0 unchanged.

Start the GNUe application service.

$ sudo service gnue-appserver start
Starting gnue-appserver: Exporting our services via xmlrpc (port 8765) ...
Reloading class repository ...
Class repository loaded

... GNUe Application Server up and running ...

                                                           [  OK  ]

Edit the file

/etc/gnue/connection.conf

In the "appserver" entry, comment the line

# authentication = yes

Try loading the following sample files that come with gnue-appserver

$ cd /usr/share/doc/gnue-appserver-0.5.2/examples/
$ gnue-readgcd sample.gcd
Loading gcd files ...
Updating schema ...
Updating class repository ...
  Modules   :   1 inserted,   0 updated,   0 unchanged.
  Classes   :   2 inserted,   0 updated,   0 unchanged.
  Properties:  24 inserted,   0 updated,   0 unchanged.
  Procedures:   6 inserted,   0 updated,   0 unchanged.
  Parameters:   0 inserted,   0 updated,   0 unchanged.
$ gnue-readgld sample-C.gld
Loading GNUe language definitions
  Labels  :  15 inserted,   0 updated,   0 unchanged.
  Messages:   2 inserted,   0 updated,   0 unchanged.
$ gnue-readgld sample-de.gld
Loading GNUe language definitions
  Labels  :  15 inserted,   0 updated,   0 unchanged.
  Messages:   2 inserted,   0 updated,   0 unchanged.
$ gnue-schema -y sample.gsd
Updating schema ...
Updating data ...
  updating table 'address_country' ...
    Rows: 240 inserted, 0 updated, 0 unchanged.
  updating table 'address_person' ...
    Rows: 4 inserted, 0 updated, 0 unchanged.

In the same directory, view a sample GNUe form that connects to the appserver as the data source.

$ gnue-forms sample.gfd

Alternatively, have the application server provide gnue-forms the form and the data.

$ gnue-forms appserver://appserver/form/address_person