This is a creation in
Article, where the information may have evolved or changed.
1. Install the Linux installation first
Http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
RPM-IVH oracle-instantclient11.2-basic-12.1.0.2.0.x86_64.rpm
RPM-IVH oracle-instantclient11.2-sqlplus-12.1.0.2.0.x86_64.rpm
Export Oracle_home=/usr/lib/oracle/12.1/client64
Export path= $ORACLE _home/bin: $PATH
Export Ld_library_path= $ORACLE _home/lib
Sqlplus "scott/xxx@ (description= (address= (protocol=tcp) (host=192.168.11.149)) (port=1521 (connect_data= )))"
2.
sudo ln-s/usr/include/oracle/12.1/client64 $ORACLE _home/include
Export Pkg_config_path=~/pkg_config_path
VI ~/pkg_config_path/oci8.pc
OCI8.PC View Https://github.com/mattn/go-oci8
Go get github.com/mattn/go-oci8
3. Test
Https://github.com/wendal/go-oci8/blob/master/example/oracle.go
Key
DB, err: = SQL. Open ("Oci8", "scott/tiger@" (description= (address= (protocol=tcp) (host=192.168.11.149) (port=1521)) (Connect_data= ( SID=ORCL))) ")
Https://help.ubuntu.com/community/Oracle%20Instant%20Client