このシリーズの他の記事は、オラクル・クラウドの個人ブログ一覧 からご覧いただけます。
初めに
このブログでは、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スクリプト