OCI CLIのインストール作業

OCIのリソースをTerraformで管理しようとTerraformの実行環境の準備を進めているとどうやらOCI CLIの実行環境が必要との事。
なので今回はCentOS7.8にOCI CLIの実行環境を準備します。

COI CLIのインストール

bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)"

インストールが始まるとちょいちょい下記のように聞かれるのすべてエンターでOK

===> In what directory would you like to place the install? (leave blank to use '/root/lib/oracle-cli'):
===> In what directory would you like to place the 'oci' executable? (leave blank to use '/root/bin'):
===> In what directory would you like to place the OCI scripts? (leave blank to use '/root/bin/oci-cli-scripts'):
===> In what directory would you like to place the OCI scripts? (leave blank to use '/root/bin/oci-cli-scripts'):
===> Currently supported optional packages are: ['db (will install cx_Oracle)']
===> Modify profile to update your $PATH and enable shell/tab completion now? (Y/n):
===> Enter a path to an rc file to update (leave blank to use '/root/.bashrc'):

最後に下記文言がターミナルに表示されたらインストール完了

-- Installation successful.
-- Run the CLI with /root/bin/oci --help

whichコマンドでociコマンドがインストールされているか確認しよう。

[root@localhost ~]# which oci
/root/bin/oci
[root@localhost ~]#