本ブログは、オラクル・クラウドの個人ブログ一覧の1つです。
初めに
このブログでは、PowerShellスクリプトを活用して、SQL Developerの自動インストールを実現する方法を解説します。特に、クラウド環境での効率的なセットアップを目指す方や、Computeインスタンスの作成時に開発ツールを自動的にインストールしたい方にとって役立つ内容となっています。
cloud-initスクリプトに組み込むことで、インスタンスの初期設定時にSQL Developerを自動的にインストールできるため、手作業によるインストールの手間を省き、環境構築のスピードを大幅に向上させることが可能です。
環境情報
Windows Server 2019 Standard Edition (OCI VM)
SQL Devloper 24.3 (Windows 64-bit with JDK 17 included)
ステップ
- インストーラのダウンロード (リンク)
- インストーラの解凍
- インストーラの削除(オプション)
#ps1_sysnative
# Define the URL of the SQL Developer installer
$InstallerFile = "sqldeveloper-24.3.1.347.1826-x64.zip"
$InstallerUrl = "https://download.oracle.com/otn_software/java/sqldeveloper/" + $InstallerFile
# Define the path where you want to save the installer
$InstallerPath = Join-Path $env:TEMP $InstallerFile
# Download the installer
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri $InstallerUrl -OutFile $InstallerPath
# Unzip the installer
Expand-Archive -Path $InstallerPath -DestinationPath "C:\"
# Clean up the installer after installation
Remove-Item $InstallerPath
OCI cloud-initスクリプトで使用する場合は、スクリプトの先頭に#ps1_sysnative
を追加する必要があります。
関連記事
SQL Developerで様々なDBに接続する方法
Oracle LinuxでSQL Developerを利用する方法
OCI Cloud-initスクリプト