Tuesday, 27 January 2009
Tuesday, 7 October 2008
ODBC intallation on CentOS
Installation of ODBC drivers
[root@localhost ~]# wget http://downloads.sourceforge.net/iodbc/libiodbc-3.52.6-1.i386.rpm
[root@localhost ~]# wget http://downloads.sourceforge.net/iodbc/libiodbc-devel-3.52.6-1.i386.rpm
[root@localhost ~]# rpm -i libiodbc-3.52.6-1.i386.rpm
[root@localhost ~]# rpm -i libiodbc-devel-3.52.6-1.i386.rpm
[root@localhost ~]# wget http://downloads.sourceforge.net/iodbc/libiodbc-3.52.6-1.i386.rpm
[root@localhost ~]# wget http://downloads.sourceforge.net/iodbc/libiodbc-devel-3.52.6-1.i386.rpm
[root@localhost ~]# rpm -i libiodbc-3.52.6-1.i386.rpm
[root@localhost ~]# rpm -i libiodbc-devel-3.52.6-1.i386.rpm
PostgreSQL ODBC installation
ODBC installation on CentOS for PostgreSQL DB
[root@localhost ~]# yum -y install unixODBC.i386 unixODBC-devel.i386
[root@localhost ~]# wget http://yum.pgsqlrpms.org/8.3/redhat/rhel-5-i386/postgresql-odbc-08.03.0100-1PGDG.rhel5.i686.rpm
[root@localhost ~]# rpm -i postgresql-odbc-08.03.0100-1PGDG.rhel5.i686.rpm
[root@localhost ~]# vi /etc/odbc.ini
...
[PSQL]
Description = My Database
Driver = PostgreSQL
Trace = No
TraceFil = /tmp/odbc.log
Database = postgres
Servername = postgresql-server
Username = postgres
Password = tunafish
Port = 5432
ReadOnly = No
...
[root@localhost ~]# vi /etc/odbcinst.ini
...
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/libodbcpsql.so
Setup = /usr/lib/libodbcpsqlS.so
FileUsage = 1
...
[root@localhost ~]# isql PSQL
+---------------------------------------+
| Connected! |
+---------------------------------------+
SQL>
...
[root@localhost ~]#
[root@localhost ~]# yum -y install unixODBC.i386 unixODBC-devel.i386
[root@localhost ~]# wget http://yum.pgsqlrpms.org/8.3/redhat/rhel-5-i386/postgresql-odbc-08.03.0100-1PGDG.rhel5.i686.rpm
[root@localhost ~]# rpm -i postgresql-odbc-08.03.0100-1PGDG.rhel5.i686.rpm
[root@localhost ~]# vi /etc/odbc.ini
...
[PSQL]
Description = My Database
Driver = PostgreSQL
Trace = No
TraceFil = /tmp/odbc.log
Database = postgres
Servername = postgresql-server
Username = postgres
Password = tunafish
Port = 5432
ReadOnly = No
...
[root@localhost ~]# vi /etc/odbcinst.ini
...
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/libodbcpsql.so
Setup = /usr/lib/libodbcpsqlS.so
FileUsage = 1
...
[root@localhost ~]# isql PSQL
+---------------------------------------+
| Connected! |
+---------------------------------------+
SQL>
...
[root@localhost ~]#
PostgreSQL Administration
PostgreSQL Installation on CentOS (Linux i386)
[root@localhost ~]# mkdir postgreSQL
[root@localhost ~]# cd postgreSQL
[root@localhost postgreSQL]# wget http://yum.pgsqlrpms.org/8.3/redhat/rhel-5-i386/postgresql-libs-8.3.4-1PGDG.rhel5.i386.rpm
[root@localhost postgreSQL]# wget http://yum.pgsqlrpms.org/8.3/redhat/rhel-5-i386/postgresql-8.3.4-1PGDG.rhel5.i386.rpm
[root@localhost postgreSQL]# wget http://yum.pgsqlrpms.org/8.3/redhat/rhel-5-i386/postgresql-server-8.3.4-1PGDG.rhel5.i386.rpm
[root@localhost postgreSQL]# rpm -i postgresql-libs-8.3.4-1PGDG.rhel5.i386.rpm
[root@localhost postgreSQL]# rpm -i postgresql-8.3.4-1PGDG.rhel5.i386.rpm
[root@localhost postgreSQL]# rpm -i postgresql-server-8.3.4-1PGDG.rhel5.i386.rpm
[root@localhost postgreSQL]# service postgresql initdb
Initializing database: [ OK ]
[root@localhost postgreSQL]# su - postgres
-bash-3.2$ vi /var/lib/pgsql/data/pg_hba.conf
...
local all all trust
host all all 127.0.0.1/32 trust
host all all 192.168.10.0/24 md5
...
-bash-3.2$ psql
Welcome to psql 8.2.9, the PostgreSQL interactive terminal.
...
postgres=# alter user postgres with password '';
...
-bash-3.2$ vi /var/lib/pgsql/data/pg_hba.conf
...
local all all md5
host all all 127.0.0.1/32 md5
host all all 192.168.10.0/24 md5
...
-bash-3.2$ vi /var/lib/pgsql/data/postgresql.conf
...
listen_addresses = '*'
...
-bash-3.2$ exit
[root@localhost postgreSQL]# /etc/init.d/postgresql start
Starting postgresql service: [ OK ]
[root@localhost ~]# mkdir postgreSQL
[root@localhost ~]# cd postgreSQL
[root@localhost postgreSQL]# wget http://yum.pgsqlrpms.org/8.3/redhat/rhel-5-i386/postgresql-libs-8.3.4-1PGDG.rhel5.i386.rpm
[root@localhost postgreSQL]# wget http://yum.pgsqlrpms.org/8.3/redhat/rhel-5-i386/postgresql-8.3.4-1PGDG.rhel5.i386.rpm
[root@localhost postgreSQL]# wget http://yum.pgsqlrpms.org/8.3/redhat/rhel-5-i386/postgresql-server-8.3.4-1PGDG.rhel5.i386.rpm
[root@localhost postgreSQL]# rpm -i postgresql-libs-8.3.4-1PGDG.rhel5.i386.rpm
[root@localhost postgreSQL]# rpm -i postgresql-8.3.4-1PGDG.rhel5.i386.rpm
[root@localhost postgreSQL]# rpm -i postgresql-server-8.3.4-1PGDG.rhel5.i386.rpm
[root@localhost postgreSQL]# service postgresql initdb
Initializing database: [ OK ]
[root@localhost postgreSQL]# su - postgres
-bash-3.2$ vi /var/lib/pgsql/data/pg_hba.conf
...
local all all trust
host all all 127.0.0.1/32 trust
host all all 192.168.10.0/24 md5
...
-bash-3.2$ psql
Welcome to psql 8.2.9, the PostgreSQL interactive terminal.
...
postgres=# alter user postgres with password '
...
-bash-3.2$ vi /var/lib/pgsql/data/pg_hba.conf
...
local all all md5
host all all 127.0.0.1/32 md5
host all all 192.168.10.0/24 md5
...
-bash-3.2$ vi /var/lib/pgsql/data/postgresql.conf
...
listen_addresses = '*'
...
-bash-3.2$ exit
[root@localhost postgreSQL]# /etc/init.d/postgresql start
Starting postgresql service: [ OK ]
Subscribe to:
Posts (Atom)