Go Installation
- Get download from https://golang.org/dl/
- See documentation for installation -> https://golang.org/doc/install
For linux - quick guide
- Untar into -> tar -C /usr/local -xzf go1.11.linux-amd64.tar.gz
- PATH=$PATH:/usr/local/go/bin
run_rman Installation
Default GOPATH is ~/go
So to install for default is
- mkdir ~/go/src/github.com/daviesluke
- mkdir ~/go/bin
- cd ~/go/src/github.com/daviesluke
- git clone https://github.com/daviesluke/go
- Follow oracle setup
- cd ~/go/src/github.com/daviesluke/run_rman/run_rman
- go install
- ~/go/bin/run_rman
For installtion to non-default location
- Set environment GOPATH to fully qualified directory path e.g. /home/luke/testing/go
- mkdir -p $GOPATH/src/github.com/daviesluke
- mkdir -p $GOPATH/bin
- cd $GOPATH/src/github.com/daviesluke
- git clone https://github.com/daviesluke/go
- Follow oracle setup
- cd $GOPATH/src/github.com/daviesluke/run_rman/run_rman
- go install
- PATH=$GOPATH/bin:$PATH
- run_rman
Oracle Setup
-
Set up oci8.pc file with following contents - changing ORACLE_HOME and version as required
ORACLE_HOME=/u01/app/oracle/product/18.0.0.0/db1 Name: oci8 Description: Oracle Call Interface Version: 18.0 Cflags: -I${ORACLE_HOME}/rdbms/public Libs: -L${ORACLE_HOME}/lib -Wl,-rpath,${ORACLE_HOME}/lib -lclntsh
-
Set env variable PKG_CONFIG_PATH to directory containing the oci8.pc file
-
go get github.com/daviesluke/mattn/go-oci8