linux5.5安装oracle11G所需软件包
在redhat e5中安装oracle11g之前的安装检查,其实是unixODBC2.2.11-7.1的安装包,包括i386和x64-unixODBC-2.2.11-7.1-i386_x64.zip
安装unixODBC
tar -xzf unixODBC-2.3.0.tar.gz
cd unixODBC-2.3.0
./configure --prefix=/usr/local/unixODBC --includedir=/usr/include --libdir=/usr/lib -bindir=/usr/bin --sysconfdir=/etc
make
make install
安装成功后,unixODBC所需的头文件都被安装到了/usr/inlucde下,编译好的库文件安装到了/usr/lib下,与unixODBC相关的可执行文件安装到了/usr/bin下,配置文件放到了/etc下。
或者
rpm -ivh unixODBC-2.2.11-7.1.i386.rpm unixODBC-devel-2.2.11-7.1.i386.rpm
二.安装mysql-connector-odbc
rpm -ivh mysql-connector-odbc-5.1.8-1.rhel5.i386.rpm --nodeps
(- -nodeps)为忽略依赖关系。
三.配置myodbc
vi /etc/odbc.ini
[mysql-test]
Description = MySQL test database
Trace = On
TraceFile = stderr
Driver = mysql
SERVER = localhost
USER = root
PASSWORD = kaychen
PORT = 3306
DATABASE = test
socket = /tmp/mysql.sock
vi /etc/odbcinst.ini
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/libodbcpsql.so
Setup = /usr/lib/libodbcpsqlS.so
FileUsage = 1
[MySQL ODBC 5.1 Driver]
Driver = /usr/lib/libmyodbc5.so
UsageCount = 1
[mysql]
Description = MySQL driver
Driver = /usr/lib/libmyodbc5.so
Setup = /usr/lib/libodbcmyS.so
Socket = /tmp/mysql.sock
FileUsage = 1
测试连接:isql mysql-test 或者isql mysql-test root kaychen
[root@K-RedHat5 mysql5.1]# isql mysql-test
+—————————————+
| Connected! |
| sql-statement |
| help [tablename] |
| quit |
+—————————————+
连接成功