Difference: Appx429PostgreSQLRedHat5 (2 vs. 3)

Revision 32011-07-25 - ChrisBrower

Line: 1 to 1
 
META TOPICPARENT name="APPXAdministrator"

APPX 4.2.9, PostgreSQL, and UnixODBC on RHEL 5/Scientific Linux 5/Oracle Linux 5/CentOS 5

Line: 50 to 51
  The appx.env file has a line beginning with APPX_ODBC_LIB, which points to the MySQL UnixODBC Connector driver. It can be remarked out. APPX should not have any trouble locating the driver without it.
#APPX_ODBC_LIB=/usr/lib/libmyodbc5.so
Added:
>
>

Configuring pg_hba.conf and postgresql.conf

To make unixODBC and PostgreSQL work, I had to change both pg_hba.conf and postgresql.conf, which are both found in /var/lib/pgsql/data/. I had to change the end of pg_hba.conf to look like this:

[root@slinux ~]# tail /var/lib/pgsql/data/pg_hba.conf 
# on a non-local interface via the listen_addresses configuration parameter,
# or via the -i or -h command line switches.
#



# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
host    all         all         ::1/128               trust
host    all         all         192.168.1.0/24        trust
local   all         all                               trust
[root@slinux ~]#

The postgresql.conf file has a line that looks like this:

#listen_addresses = 'localhost'        # what IP address(es) to listen on;

I copied the line and changed 'localhost' to '*', and un-remarked it, so it looks like this now:

#listen_addresses = 'localhost'        # what IP address(es) to listen on;
listen_addresses = '*'                 # what IP address(es) to listen on;
 

64 Bit

Installing PostgreSQL

Line: 103 to 132
 The appx.env file has a line beginning with APPX_ODBC_LIB, which points to the MySQL UnixODBC Connector driver. It can be remarked out. APPX should not have any trouble locating the driver without it.
#APPX_ODBC_LIB=/usr/lib/libmyodbc5.so
Added:
>
>

Configuring pg_hba.conf and postgresql.conf

To make unixODBC and PostgreSQL work, I had to change both pg_hba.conf and postgresql.conf, which are both found in /var/lib/pgsql/data/. I had to change the end of pg_hba.conf to look like this:

[root@slinux ~]# tail /var/lib/pgsql/data/pg_hba.conf 
# on a non-local interface via the listen_addresses configuration parameter,
# or via the -i or -h command line switches.
#



# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
host    all         all         ::1/128               trust
host    all         all         192.168.1.0/24        trust
local   all         all                               trust
[root@slinux ~]#

The postgresql.conf file has a line that looks like this:

#listen_addresses = 'localhost'        # what IP address(es) to listen on;

I copied the line and changed 'localhost' to '*', and un-remarked it, so it looks like this now:

#listen_addresses = 'localhost'        # what IP address(es) to listen on;
listen_addresses = '*'                 # what IP address(es) to listen on;
 

Testing/Troubleshooting

32 Bit

Added:
>
>
ISQL can be used to test the connection between PostgreSQL and unixODBC using the 32-bit ODBC Connector driver. ISQL isn't necessary for APPX to connect to PostgreSQL, but it can be a useful tool for testing the driver APPX will be using. A successful test should look something like this:
[root@slinux ~]# isql postgresql
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> quit
[root@slinux ~]#
 

64 Bit

ISQL can be used to test the connection between PostgreSQL and unixODBC using the 32-bit ODBC Connector driver. ISQL isn't necessary for APPX to connect to PostgreSQL, but it can be a useful tool for testing the driver APPX will be using. You will need to have the 32-bit ISQL file for it to be a valid test, otherwise it will be testing the 64-bit driver, which is not used in APPX. To find out the bitness of ISQL, run the file command on it. This is how it should look(ELF 32-bit):

Line: 113 to 183
 [root@slinux bin]#
Changed:
<
<
If it says ELF 64-bit, the 32 bit version needs to be installed.
>
>
If it says ELF 64-bit, the 32 bit version needs to be installed. A successful test should look something like this:
[root@slinux ~]# isql postgresql
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> quit
[root@slinux ~]#
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback