Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Changed: | ||||||||
< < | APPX 4.2.9, MySQL, and UnixODBC on RHEL 6/Scientific Linux 6/Oracle Linux 6/CentOS 6 | |||||||
> > | APPX 4.2.9, PostgreSQL, and UnixODBC on RHEL 5/Scientific Linux 5/Oracle Linux 5/!CentOS 5 | |||||||
Overview | ||||||||
Changed: | ||||||||
< < | This document will demonstrate how to configure APPX 4.2.9 and MySQL on a 64 bit or 32 bit Red Hat based Linux server using 32 bit unixODBC drivers.
32-Bit Red Hat/Scientific Linux/Oracle Linux 6 | |||||||
> > | This document will demonstrate how to configure APPX 4.2.9 and PostgreSQL on a 64 bit or 32 bit Red Hat 5 based Linux server using 32 bit unixODBC drivers.
64 BitInstalling PostgreSQL | |||||||
Changed: | ||||||||
< < | Configuring APPX 4.2.9 and MySQL on 32 bit Red Hat using unixODBC drivers should be the simplest option because bitness shouldn't be an issue. Here is what I did to make it work:
Installing MySQL | |||||||
> > | To install PostgreSQL, use the package manager to install postgresql and postgresql-server.
postgresql.x86_64 : PostgreSQL client programs and libraries. postgresql-server.x86_64 : The programs needed to create and run a PostgreSQL : server. | |||||||
Changed: | ||||||||
< < | MySQL can be installed with yum by installing the following packages:
mysql.i686 : MySQL client programs and shared libraries mysql-server.i686 : The MySQL server and related files | |||||||
> > | Installing UnixODBC | |||||||
Changed: | ||||||||
< < | Installing unixODBC and the MySQL ODBC Connector | |||||||
> > | To install unixODBC, install unixODBC.i386 using the package manager. The 32 bit version is needed, so be sure to specify that when installing it.
unixODBC.i386 : A complete ODBC driver manager for Linux. | |||||||
Changed: | ||||||||
< < | UnixODBC can also be installed using yum by installing the following packages:
unixODBC.i686 : A complete ODBC driver manager for Linux mysql-connector-odbc.i686 : ODBC driver for MySQL | |||||||
> > | Installing the ODBC Connector | |||||||
Changed: | ||||||||
< < | Configuring odbc.ini and odbcinst.iniThe odbcinst.ini file, found in /etc, must be configured to point to the 32-bit MySQL ODBC Connector driver. I didn't need to make any changes to this file, but if you are unable to connect, make sure the path to the 32-bit driver is correct. For APPX, the path to the 64 bit driver is not important.[root@localhost ~]# cat /etc/odbcinst.ini # Example driver definitions # Driver from the mysql-connector-odbc package # Setup from the unixODBC package [MySQL] Description = ODBC for MySQL Driver = /usr/lib/libmyodbc5.so Setup = /usr/lib/libodbcmyS.so Driver64 = /usr/lib64/libmyodbc5.so Setup64 = /usr/lib64/libodbcmyS.so FileUsage = 1 [root@localhost ~]#The odbc.ini file is another one that may need to be configured. It is also found in /etc. Make sure all the information there is correct. The database should match the database you are trying to connect to. Here's an example of what this file should look like, but check to make sure it is correct for your system. [root@localhost ~]# cat /etc/odbc.ini [mysql] Description = mysql Driver = mysql Server = localhost Database = test Port = Socket = Option = Stmt = [root@localhost ~]# Configuring appx.envThe appx.env file needs to be configured to point APPX to the 32-bit MySQL ODBC Connector drivers. I didn't have to make any changes to this file when I installed the connector using the package manager. The line beginning with APPX_ODBC_LIB should contain the path to the 32-bit connector driver. It should look something like this:APPX_ODBC_LIB=/usr/lib/libmyodbc5.so 64-Bit Red Hat/Scientific Linux/Oracle Linux 6APPX can connect to 64-bit MySQL using 32-bit ODBC connector drivers and some 32-bit libraries that can be installed through the package manager.Installing MySQLMySQL can be installed with yum by installing the following packages:mysql.x86_64 : MySQL client programs and shared libraries mysql-server.x86_64 : The MySQL server and related files | |||||||
> > | The ODBC connector might not be included in the package manager by default. If it is, it would be named something like postgresql-odbc.i386. If not, it can be downloaded and installed from the internet. I went to Scientific Linux's website and found the package in the downloads section. You can download it here, but you may want to look on your distribution's website if you're not using Scientific Linux 5.6. | |||||||
Changed: | ||||||||
< < | Installing unixODBCUnixODBC can also be installed using yum by installing the following packages:unixODBC.i686 : A complete ODBC driver manager for Linux mysql-connector-odbc.i686 : ODBC driver for MySQL Installing the ODBC ConnectorsThe 32-bit connectors might not be included in the repository. If they are not there, they can be installed with: (You may want to modify this link to match your distro. I was running Scientific Linux 6, so I went to Scientific Linux's site and found the package there.)yum install http://ftp1.scientificlinux.org/linux/scientific/6.0/i386/os/Packages/mysql-connector-odbc-5.1.5r1144-7.el6.i686.rpm | |||||||
> > | Once the rpm is downloaded, install it with yum to take care of any dependencies automatically. The command is:
yum localinstall path-to-file | |||||||
Configuring odbc.ini and odbcinst.ini | ||||||||
Changed: | ||||||||
< < | The odbcinst.ini file, found in /etc, must be configured to point to the 32-bit MySQL ODBC Connector driver. I didn't need to make any changes to this file, but if you are unable to connect, make sure the path to the 32-bit driver is correct.
[root@localhost etc]# cat odbcinst.ini # Example driver definitions # Driver from the mysql-connector-odbc package # Setup from the unixODBC package [MySQL] Description = ODBC for MySQL Driver = /usr/lib/libmyodbc5.so Setup = /usr/lib/libodbcmyS.so #Driver64 = /usr/lib64/libmyodbc5.so #Setup64 = /usr/lib64/libodbcmyS.so FileUsage = 1 [root@localhost etc]#The odbc.ini file is another one that may need to be configured. It is also found in /etc. Make sure all the information there is correct. The database should match the database you are trying to connect to. Here's an example of what this file should look like, but check to make sure it is correct for your system. [root@localhost etc]# cat odbc.ini [mysql] Description = mysql Driver = mysql Server = localhost | |||||||
> > | The odbcinst.ini file must be configured to point to the 32 bit PostgreSQL ODBC Connector driver. In my testing the default configuration was correct.
The odbc.ini file, however, was blank by default. Here is how mine is set up. You'll need to fill in your servername, username, password, and port, along with any other information that may need to be changed to match your system.
[root@slinux ~]# cat /etc/odbc.ini [postgresql] Description = postgresql Driver = postgresql Trace = Yes TraceFile = sql.log | |||||||
Database = test | ||||||||
Added: | ||||||||
> > | Servername = Username = Password = | |||||||
Port = | ||||||||
Changed: | ||||||||
< < | Socket = Option = Stmt = [root@localhost etc]# | |||||||
> > | Protocol = 6.4 ReadOnly = No RowVersioning = No ShowSystemTables = No ShowOidColumn = No FakeOidIndex = No ConnSettings = [root@slinux ~]# | |||||||
Configuring appx.env | ||||||||
Changed: | ||||||||
< < | The appx.env file needs to be configured to point APPX to the 32-bit MySQL ODBC Connector drivers. I didn't have to make any changes to this file when I installed the 32-bit connector using the package manager. The line beginning with APPX_ODBC_LIB should contain the path to the 32-bit connector driver. Here is an example, but the path may be different for your system.
APPX_ODBC_LIB=/usr/lib/libmyodbc5.so Additional 32-bit LibrariesBecause APPX is 32-bit, it will need some libraries that aren't found in 64-bit Red Hat by default. They can all be installed through the package manager. APPX will need the glibc, zlib, and libgcc libraries.yum install glibc-2.12-1.7.el6_0.5.i686 zlib-1.2.3-25.el6.i686 libgcc.i686 Testing/Troubleshooting32-bitISQL can be used to test the connection between MySQL and unixODBC using the MySQL ODBC Connector driver. ISQL isn't necessary for APPX to connect to MySQL, but it can be a useful tool for testing the driver APPX will be using. Bitness shouldn't be an issue with 32 bit Red Hat. A successful test should look like this:[root@localhost ~]# isql mysql +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL> 64-bitISQL can be used to test the connection between MySQL and unixODBC using the 32-bit MySQL ODBC Connector driver. ISQL isn't necessary for APPX to connect to MySQL, 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):[root@localhost ~]# file /usr/bin/isql /usr/bin/isql: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, strippedIf it looks like this(ELF 64-bit), you will need to get the 32-bit version: [root@localhost ~]# file /usr/bin/isql /usr/bin/isql: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, strippedA positive test using ISQL should result in something like this: [root@localhost ~]# isql mysql +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL> Comments:Read what other users have said about this page or add your own comments. | |||||||
> > | 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 |