ablog

不器用で落着きのない技術者のメモ

Amazon Linux 2 に SQLcl をインストールする

Amazon Linux 2 に SQLcl をインストールしたメモ。

インストール

  • Open JDK 1.8.0 をインストール
$ sudo su - ec2-user
$ sudo yum -y install java-1.8.0-openjdk-devel.x86_64
$ java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
$ sudo su - oracle
$ unzip sqlcl-20.2.0.174.1557.zip
$ vi ~/.bash_profile
alias sql="${HOME}/sqlcl/bin/sql"
$ source ~/.bash_profile

使ってみる

$ sql / as sysdba

参考

JRE Support

  • SQLcl release 20.2 requires Java version 1.8 and above. Go here to download the latest version.
  • If SQLcl cannot find a local JRE, you will be prompted to enter the location path for the JRE. Note that the prompt wants only the folder, not the java.exe. For example C:\Program Files\Java\jre1.8.0_91
  • Java versions 9 and 10 are not yet supported.
SQLcl 20.2 Release Notes