インターネット接続可能なRDS Oracle Databaseをサクッと建てる
すぐ潰す用途だし、より手軽にしたいので外部公開してインターネット接続可能にしています。
VPC
事前に専用のVPC環境を構築しておきます。VPCを作ります。作ったらDNSホスト名を有効にしておきます。
![](https://www.blog.danishi.net/wp-content/uploads/2020/06/image.png)
![](https://www.blog.danishi.net/wp-content/uploads/2020/06/image-1-1024x652.png)
ルートテーブルにインターネットゲートウェイをデフォルトゲートウェイとして設定します。
セキュリティグループを作ってインバウンドの1521ポートを解放します。
![](https://www.blog.danishi.net/wp-content/uploads/2020/06/image-2-1024x480.png)
![](https://www.blog.danishi.net/wp-content/uploads/2021/01/image-1024x96.png)
これでVPCの準備はOKです。
RDS
RDSを構築する
先ほど作ったVPCを使ってDBサブネットグループを作成します。![](https://www.blog.danishi.net/wp-content/uploads/2020/06/image-3.png)
(なるべく安くなりそうな構成で)
![](https://www.blog.danishi.net/wp-content/uploads/2020/06/image-4.png)
![](https://www.blog.danishi.net/wp-content/uploads/2020/06/image-5.png)
![](https://www.blog.danishi.net/wp-content/uploads/2020/06/image-6.png)
![](https://www.blog.danishi.net/wp-content/uploads/2020/06/image-7.png)
![](https://www.blog.danishi.net/wp-content/uploads/2020/06/image-8.png)
![](https://www.blog.danishi.net/wp-content/uploads/2020/06/image-9.png)
![](https://www.blog.danishi.net/wp-content/uploads/2020/06/image-10.png)
接続確認
管理ユーザーのパスワードを控えておきます。![](https://www.blog.danishi.net/wp-content/uploads/2020/06/image-11-1024x51.png)
>sqlplus admin/password@database-oracle.**********.ap-northeast-1.rds.amazonaws.com/orcl
SQL*Plus: Release 12.2.0.1.0 Production on 月 6月 15 23:13:15 2020
Copyright (c) 1982, 2016, Oracle. All rights reserved.
最終正常ログイン時間: 月 6月 15 2020 22:01:29 +09:00
Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
に接続されました。
SQL> select Banner from V$VERSION;
BANNER
--------------------------------------------------------------------------------
Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
PL/SQL Release 12.2.0.1.0 - Production
CORE 12.2.0.1.0 Production
TNS for Linux: Version 12.2.0.1.0 - Production
NLSRTL Version 12.2.0.1.0 - Production
お金がもったいないので用が済んだら、停止か削除しておきましょう。
ディスカッション
コメント一覧
まだ、コメントがありません