From Fedora Project Wiki

(New page: 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...)
 
(fix preformatted bits with leading whitespace)
 
Line 1: Line 1:
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.
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 2008-11-02, these do not exist in Fedora.
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.
$ sudo yum install gnue-appserver{,-doc} gnue-forms.


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


$ sudo yum install postgresql{,-server}
$ sudo yum install postgresql{,-server}


In the configuration file,
In the configuration file,


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


uncomment the following line.
uncomment the following line.


listen_addresses = 'localhost'
listen_addresses = 'localhost'


Edit Postgresql's host-based authentication file
Edit Postgresql's host-based authentication file


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


and these 4 lines as the first entries.
and these 4 lines as the first entries.


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


Get Postgresql started.
Get Postgresql started.


$ sudo service postgresql initdb
$ sudo service postgresql initdb
$ sudo service postgresql start
$ sudo service postgresql start


Create a "gnue" user in Postgresql.
Create a "gnue" user in Postgresql.


$ sudo -u postgres createuser -r --no-superuser --createdb --no-adduser gnue
$ 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".
GNUe can probably create databases, but you should probably just make one called "gnue_test".


$ sudo -u postgres createdb --owner=gnue 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.
Should you need Postgres to notice any changed settings in the pg_hba.conf, then reload Postgresql with this command.


$ sudo service postgresql reload
$ sudo service postgresql reload


Use the sample connections.conf file
Use the sample connections.conf file


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


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


dbname = gnue_test
dbname = gnue_test


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


provider = psycopg2
provider = psycopg2


Initialize GNUe with the gnue-schema command.
Initialize GNUe with the gnue-schema command.


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


Start the GNUe application service.
Start the GNUe application service.


$ sudo service gnue-appserver start
$ sudo service gnue-appserver start
Starting gnue-appserver: Exporting our services via xmlrpc (port 8765) ...
Starting gnue-appserver: Exporting our services via xmlrpc (port 8765) ...
Reloading class repository ...
Reloading class repository ...
Class repository loaded
Class repository loaded
 
... GNUe Application Server up and running ...
... GNUe Application Server up and running ...
 
                                                          [  OK  ]
                                                            [  OK  ]


Edit the file
Edit the file


/etc/gnue/connection.conf
/etc/gnue/connection.conf


In the "appserver" entry, comment the line
In the "appserver" entry, comment the line


# authentication = yes
# authentication = yes


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


$ cd /usr/share/doc/gnue-appserver-0.5.2/examples/
$ cd /usr/share/doc/gnue-appserver-0.5.2/examples/
$ gnue-readgcd sample.gcd
$ gnue-readgcd sample.gcd
Loading gcd files ...
Loading gcd files ...
Updating schema ...
Updating schema ...
Updating class repository ...
Updating class repository ...
  Modules  :  1 inserted,  0 updated,  0 unchanged.
  Modules  :  1 inserted,  0 updated,  0 unchanged.
  Classes  :  2 inserted,  0 updated,  0 unchanged.
  Classes  :  2 inserted,  0 updated,  0 unchanged.
  Properties:  24 inserted,  0 updated,  0 unchanged.
  Properties:  24 inserted,  0 updated,  0 unchanged.
  Procedures:  6 inserted,  0 updated,  0 unchanged.
  Procedures:  6 inserted,  0 updated,  0 unchanged.
  Parameters:  0 inserted,  0 updated,  0 unchanged.
  Parameters:  0 inserted,  0 updated,  0 unchanged.
$ gnue-readgld sample-C.gld
$ gnue-readgld sample-C.gld
Loading GNUe language definitions
Loading GNUe language definitions
  Labels  :  15 inserted,  0 updated,  0 unchanged.
  Labels  :  15 inserted,  0 updated,  0 unchanged.
  Messages:  2 inserted,  0 updated,  0 unchanged.
  Messages:  2 inserted,  0 updated,  0 unchanged.
$ gnue-readgld sample-de.gld
$ gnue-readgld sample-de.gld
Loading GNUe language definitions
Loading GNUe language definitions
  Labels  :  15 inserted,  0 updated,  0 unchanged.
  Labels  :  15 inserted,  0 updated,  0 unchanged.
  Messages:  2 inserted,  0 updated,  0 unchanged.
  Messages:  2 inserted,  0 updated,  0 unchanged.
$ gnue-schema -y sample.gsd
$ gnue-schema -y sample.gsd
Updating schema ...
Updating schema ...
Updating data ...
Updating data ...
  updating table 'address_country' ...
  updating table 'address_country' ...
    Rows: 240 inserted, 0 updated, 0 unchanged.
    Rows: 240 inserted, 0 updated, 0 unchanged.
  updating table 'address_person' ...
  updating table 'address_person' ...
    Rows: 4 inserted, 0 updated, 0 unchanged.
    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.
In the same directory, view a sample GNUe form that connects to the appserver as the data source.


$ gnue-forms sample.gfd
$ gnue-forms sample.gfd


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


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


----
----


[[Category:GNU Enterprise]]
[[Category:GNU Enterprise]]

Latest revision as of 09:23, 20 January 2010

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