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.gzcd 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相關(guān)的可執(zhí)行文件安裝到了/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)為忽略依賴關(guān)系。
三.配置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 |
+—————————————+
連接成功