簡介
有關之前Oracle 23c免費開發者版的部份連線說明:
https://xmmup.com/oracle-database-23cmianfeikaifazhebanjianjie.html
https://xmmup.com/zaidockerzhongkuaisutiyanoracle-23cmianfeikaifazheban.html
https://xmmup.com/oracle-database-23cmianfeikaifazhebandanjianzhuang.html
2024.05.03, Oracle Database 23ai 釋出,現在 Oracle 23c 正式更名為 Oracle 23ai 。
Oracle GoldenGate 23ai和GoldenGate 23ai 免費版也可供下載,地址:https://www.oracle.com/middleware/technologies/goldengate-downloads.html
Oracle資料庫23ai專註於三個關鍵領域。
人工智慧數據
數據開發
數據的關鍵任務
Oracle 23ai官方docker環境
官方docker
1docker pull container-registry.oracle.com/database/free:latest
2
3
4docker run -itd --name ora23ai -h ora23ai \
5 -p 1521:1521 \
6 container-registry.oracle.com/database/free:latest
7
8
9
10docker exec -it ora23ai sqlplus / as sysdba
11
12SELECT BANNER_FULL FROM V$VERSION;
13
14
15sqlplus sys@localhost:1521/FREEPDB1 as sysdba
16
17sqlplus sys@localhost:1521/FREE as sysdba
執行過程:
1[root@alldb ~]# docker pull container-registry.oracle.com/database/free:latest
2Error response from daemon: Get "https://container-registry.oracle.com/v2/": net/http: TLS handshake timeout
3
4-- 預設從docker遠端映像倉庫中拉取映像,但由於遠端倉庫的伺服器是在國外,我們國內有的使用者很可能都存取不到。需要配置代理或翻墻
5[root@alldb ~]# export all_proxy=http://127.0.0.1:9910
6[root@alldb ~]#
7[root@alldb ~]#
8[root@alldb ~]#
9[root@alldb ~]# docker pull container-registry.oracle.com/database/free:latest
10latest: Pulling from database/free
116d6e36f7c9fb: Pull complete
1221def9023b6f: Pull complete
135e7b2cfeb7fa: Pull complete
14b4a24759beff: Pull complete
1578bba54e9814: Pull complete
16716b489ad5ad: Pull complete
17c23fd8c6cbee: Pull complete
1879dea26b3a5a: Pull complete
195dfbcf799df3: Pull complete
20154719a62576: Pull complete
21Digest: sha256:83edd0756fda0e5faecc0fdf047814f0177d4224d7bf037e4900123ee3e08718
22Status: Downloaded newer image for container-registry.oracle.com/database/free:latest
23container-registry.oracle.com/database/free:latest
24You have new mail in /var/spool/mail/root
25[root@alldb ~]#
26You have new mail in /var/spool/mail/root
27[root@alldb ~]#
28[root@alldb ~]#
29[root@alldb ~]# docker run -itd --name ora23ai -h ora23ai \
30> -p 1521:1521 \
31> container-registry.oracle.com/database/free:latest
32ddcf8f7bb637eef12d627a46130e4245fd0a4823d2bb13cc96c2a3495ec5b975
33
34You have new mail in /var/spool/mail/root
35[root@alldb ~]#
36[root@alldb ~]# docker exec -it ora23ai sqlplus / as sysdba
37
38SQL*Plus: Release23.0.0.0.0 - Production on Tue May 708:29:402024
39Version23.4.0.24.05
40
41Copyright (c) 1982, 2024, Oracle. All rights reserved.
42
43
44Connected to:
45OracleDatabase23ai Free Release23.0.0.0.0 - Develop, Learn, and Run for Free
46Version23.4.0.24.05
47
48SQL> SELECT BANNER_FULL FROM V$VERSION;
49
50BANNER_FULL
51--------------------------------------------------------------------------------
52Oracle Database 23ai Free Release23.0.0.0.0 - Develop, Learn, and Run for Free
53Version23.4.0.24.05
54
55
56SQL> show pdbs
57
58 CON_ID CON_NAME OPENMODERESTRICTED
59---------- ------------------------------ ---------- ----------
602 PDB$SEEDREADONLYNO
613 FREEPDB1 READ WRITE NO
62SQL>
63
64[root@alldb ~]# docker exec -it ora23ai bash
65bash-4.4$ cat /etc/redhat-release
66Red Hat Enterprise Linux release8.9 (Ootpa)
67bash-4.4$ id
68uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba)
69bash-4.4$
GitHub環境
參考:https://github.com/oracle/adb-free/pkgs/container/adb-free ,有19c和23ai環境:
We use the following naming convention:
Database version | Latest image tag | Specific release image tag |
---|---|---|
23ai | latest-23ai | 24.4.4.2-23ai |
19c | latest | 24.4.4.2 |
1docker pull ghcr.io/oracle/adb-free:latest-23ai
2
3
4
5docker run -itd --name ora23ai -h ora23ai \
6 -p 1521:1521 \
7 container-registry.oracle.com/database/free:latest
8
9
10
11docker exec -it ora23ai sqlplus / as sysdba
12
13SELECT BANNER_FULL FROM V$VERSION;
14
15
16sqlplus sys@localhost:1521/FREEPDB1 as sysdba
17
18sqlplus sys@localhost:1521/FREE as sysdba
其它映像:
Tag | OS/Architecture | Size | Pull Command | Last Updated | Image ID |
---|---|---|---|---|---|
latest-23ai | linux/amd64 | 2.08 GB | docker pull container-registry.oracle.com/database/adb-free:latest-23ai | 6 days ago | 05353df50ddd |
24.4.4.2-23ai | linux/amd64 | 2.08 GB | docker pull container-registry.oracle.com/database/adb-free:24.4.4.2-23ai | 6 days ago | 05353df50ddd |
latest | linux/amd64 | 1.93 GB | docker pull container-registry.oracle.com/database/adb-free:latest | 6 weeks ago | 4701ee10a172 |
24.3.2.1 | linux/amd64 | 1.93 GB | docker pull container-registry.oracle.com/database/adb-free:24.3.2.1 | 6 weeks ago | 4701ee10a172 |
23.10.2.4 | linux/amd64 | 1.62 GB | docker pull container-registry.oracle.com/database/adb-free:23.10.2.4 | 3 months ago | 0cadb9d2c573 |
23.10.2.3 | linux/amd64 | 1.62 GB | docker pull container-registry.oracle.com/database/adb-free:23.10.2.3 | 4 months ago | 51194e182081 |
23.10.2.2 | linux/amd64 | 2.3 GB | docker pull container-registry.oracle.com/database/adb-free:23.10.2.2 | 6 months ago | 19e829581a93 |
23.8.5.2 | linux/amd64 | 2.27 GB | docker pull container-registry.oracle.com/database/adb-free:23.8.5.2 | 8 months ago | 8a4b5137f179 |
自己安裝Oracle 23ai單機版(基於Oracle Linux 8.9)
1docker rm -f lhrora23ai
2docker run -itd --name lhrora23ai -h lhrora23ai \
3 -p 1531:1521 -p 31389:3389 \
4 -v /sys/fs/cgroup:/sys/fs/cgroup \
5--privileged=true lhrbest/oraclelinux:8.9 \
6 /usr/sbin/init
7
8 docker exec -it lhrora23ai bash
9
10
11
12
13wget https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-23ai-1.0-2.el8.x86_64.rpm
14wget https://download.oracle.com/otn-pub/otn_software/db-free/oracle-database-free-23ai-1.0-1.el8.x86_64.rpm
15
16
17
18-- https://yum.oracle.com/repo/OracleLinux/OL9/appstream/x86_64/getPackage/oracle-database-preinstall-23ai-1.0-2.el9.x86_64.rpm
19-- https://download.oracle.com/otn-pub/otn_software/db-free/oracle-database-free-23ai-1.0-1.el9.x86_64.rpm
20dnf install -y oracle-database-preinstall*
21dnf install -y oracle-database-free*
22/etc/init.d/oracle-free-23ai configure
23
24
25cat /etc/sysconfig/oracle-free-23ai.conf
26/etc/init.d/oracle-free-23ai configure
27
28/etc/init.d/oracle-free-23ai status
29/etc/init.d/oracle-free-23ai start
30/etc/init.d/oracle-free-23ai stop
31
32
33
34cat >> /home/oracle/.bash_profile <<"EOF"
35export ORACLE_HOME=/opt/oracle/product/23ai/dbhomeFree
36export ORACLE_SID=FREE
37exportPATH=$PATH:$ORACLE_HOME/bin
38
39alias sqlplus='rlwrap sqlplus'
40alias sas='sqlplus / as sysdba'
41
42
43EOF
44
45source /home/oracle/.bash_profile
安裝過程:
1[root@alldb ~]# docker rm -f lhrora23ai
2docker run -itd --name lhrora23ai -h lhrora23ai \
3 -p 1531:1521 -p 31389:3389 \
4 -v /sys/fs/cgroup:/sys/fs/cgroup \
5--privileged=true lhrbest/oraclelinux:8.9 \
6 /usr/sbin/init
7
8 docker exec -it lhrora23ai bash
9
10lhrora23ai
11[root@alldb ~]# docker run -itd --name lhrora23ai -h lhrora23ai \
12> -p 1531:1521 -p 31389:3389 \
13> -v /sys/fs/cgroup:/sys/fs/cgroup \
14> --privileged=true lhrbest/oraclelinux:8.9 \
15> /usr/sbin/init
16f7d54d9d49bc6fc5331c6893473917e8a3974335eff1f038b095654ad41de0f7
17
18
19[root@alldb ~]#
20[root@alldb ~]# docker exec -it lhrora23ai bash
21
22
23
24[root@lhrora23ai /]#
25[root@lhrora23ai /]#
26[root@lhrora23ai /]#
27[root@lhrora23ai /]# cd /soft
28[root@lhrora23ai soft]# ll
29total 1345812
30-rw-r--r-- 1 root root 1378076936 Apr 28 02:34 oracle-database-free-23ai-1.0-1.el8.x86_64.rpm
31-rw-r--r-- 1 root root 31152 Apr 27 03:01 oracle-database-preinstall-23ai-1.0-2.el8.x86_64.rpm
32[root@lhrora23ai soft]# dnf install -y oracle-database-preinstall*
33Last metadata expiration check: 0:32:04 ago on Wed May 809:29:362024.
34Dependencies resolved.
35========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
36Package Architecture Version Repository Size
37========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
38Installing:
39oracle-database-preinstall-23ai x86_64 1.0-2.el8 @commandline 30 k
40Installing dependencies:
41 compat-openssl10 x86_64 1:1.0.2o-4.el8_6 ol8_appstream 1.1 M
42
43Transaction Summary
44========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
45Install2 Packages
46
47Total size: 1.2 M
48Total download size: 1.1 M
49Installed size: 3.0 M
50Downloading Packages:
51compat-openssl10-1.0.2o-4.el8_6.x86_64.rpm 621 kB/s | 1.1 MB 00:01
52----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
53Total 620 kB/s | 1.1 MB 00:01
54Running transactioncheck
55Transactioncheck succeeded.
56Running transactiontest
57Transactiontest succeeded.
58Running transaction
59 Preparing : 1/1
60 Installing : compat-openssl10-1:1.0.2o-4.el8_6.x86_64 1/2
61 Running scriptlet: compat-openssl10-1:1.0.2o-4.el8_6.x86_64 1/2
62 Installing : oracle-database-preinstall-23ai-1.0-2.el8.x86_64 2/2
63 Running scriptlet: oracle-database-preinstall-23ai-1.0-2.el8.x86_64 2/2
64Created symlink /etc/systemd/system/multi-user.target.wants/oracle-database-preinstall-23ai-firstboot.service → /etc/systemd/system/oracle-database-preinstall-23ai-firstboot.service.
65
66 Verifying : compat-openssl10-1:1.0.2o-4.el8_6.x86_64 1/2
67 Verifying : oracle-database-preinstall-23ai-1.0-2.el8.x86_64 2/2
68
69Installed:
70 compat-openssl10-1:1.0.2o-4.el8_6.x86_64 oracle-database-preinstall-23ai-1.0-2.el8.x86_64
71
72Complete!
73[root@lhrora23ai soft]# dnf install -y oracle-database-free*
74Last metadata expiration check: 0:33:04 ago on Wed May 809:29:362024.
75Dependencies resolved.
76========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
77Package Architecture Version Repository Size
78========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
79Installing:
80oracle-database-free-23ai x86_64 1.0-1 @commandline 1.3 G
81
82Transaction Summary
83========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
84Install1Package
85
86Total size: 1.3 G
87Installed size: 3.6 G
88Downloading Packages:
89Running transactioncheck
90Transactioncheck succeeded.
91Running transactiontest
92Transactiontest succeeded.
93Running transaction
94 Preparing : 1/1
95 Running scriptlet: oracle-database-free-23ai-1.0-1.x86_64 1/1
96 Installing : oracle-database-free-23ai-1.0-1.x86_64 1/1
97 Running scriptlet: oracle-database-free-23ai-1.0-1.x86_64 1/1
98[INFO] Executing post installation scripts...
99[INFO] Oracle home installed successfully and ready to be configured.
100To configure OracleDatabase Free, optionallymodify the parametersin'/etc/sysconfig/oracle-free-23ai.conf'andthen run '/etc/init.d/oracle-free-23ai configure'as root.
101
102 Verifying : oracle-database-free-23ai-1.0-1.x86_64 1/1
103
104Installed:
105oracle-database-free-23ai-1.0-1.x86_64
106
107Complete!
108[root@lhrora23ai soft]# cat /etc/sysconfig/oracle-free-23ai.conf
109#This is a configuration file to setup the Oracle Database.
110#It is used when running '/etc/init.d/oracle-free-23ai configure'.
111
112# LISTENER PORT used Database listener, Leave empty for automatic port assignment
113LISTENER_PORT=
114
115# Character set of the database
116CHARSET=AL32UTF8
117
118# Database file directory
119# If not specified, database files are stored under Oracle base/oradata
120DBFILE_DEST=
121
122# DB Domain name
123DB_DOMAIN=
124
125# Configure TDE
126CONFIGURE_TDE=false
127
128# Encrypt Tablespaces list, Leave empty for user tablespace alone or provide ALL for encrypting all tablespaces
129# For specific tablespaces use SYSTEM:true,SYSAUX:false
130ENCRYPT_TABLESPACES=
131
132# SKIP Validations, memory, space
133SKIP_VALIDATIONS=false
134
135[root@lhrora23ai soft]#
136[root@lhrora23ai soft]# /etc/init.d/oracle-free-23ai configure
137Specify a passwordto be used fordatabase accounts. Oracle recommends that the password entered should be atleast8charactersinlength, contain atleast1 uppercase character, 1lowercasecharacterand1 digit [0-9]. Note that the same password will be used forSYS, SYSTEMand PDBADMIN accounts:
138Confirm the password:
139Configuring Oracle Listener.
140Listener configuration succeeded.
141Configuring OracleDatabase FREE.
142Enter SYSuserpassword:
143****
144Enter SYSTEMuserpassword:
145****
146Enter PDBADMIN UserPassword:
147***
148Preparefor db operation
1497% complete
150Copying database files
15129% complete
152Creating andstartingOracleinstance
15330% complete
15433% complete
15536% complete
15639% complete
15743% complete
158Completing DatabaseCreation
15947% complete
16049% complete
16150% complete
162Creating PluggableDatabases
16354% complete
16471% complete
165Executing Post Configuration Actions
16693% complete
167Running Custom Scripts
168100% complete
169Databasecreation complete. For details check the logfilesat:
170 /opt/oracle/cfgtoollogs/dbca/FREE.
171Database Information:
172GlobalDatabaseName:FREE
173System Identifier(SID):FREE
174Look at the logfile"/opt/oracle/cfgtoollogs/dbca/FREE/FREE.log"for further details.
175
176ConnecttoOracleDatabaseusing one of the connect strings:
177Pluggabledatabase: lhrora23ai/FREEPDB1
178 Multitenant containerdatabase: lhrora23ai
179[root@lhrora23ai soft]#
180[root@lhrora23ai soft]# /etc/init.d/oracle-free-23ai status
181Statusof the Oracle FREE 23ai service:
182
183LISTENER status: RUNNING
184FREE Databasestatus: RUNNING
185[root@lhrora23ai soft]# ps -ef|grep pmon
186oracle67150010:11 ? 00:00:00 db_pmon_FREE
187root 721526010:11 pts/100:00:00 grep --color=auto pmon
188[root@lhrora23ai soft]#
189[root@lhrora23ai soft]# cat >> /home/oracle/.bash_profile <<"EOF"
190> export ORACLE_HOME=/opt/oracle/product/23ai/dbhomeFree
191> export ORACLE_SID=FREE
192> exportPATH=$PATH:$ORACLE_HOME/bin
193>
194> alias sqlplus='rlwrap sqlplus'
195> alias sas='sqlplus / as sysdba'
196>
197>
198> EOF
199[root@lhrora23ai soft]#
200[root@lhrora23ai soft]# source /home/oracle/.bash_profile
201[root@lhrora23ai soft]#
202[root@lhrora23ai soft]# su - oracle
203Last login: Wed May 810:11:50 CST 2024on pts/1
204[oracle@lhrora23ai ~]$ sas
205
206SQL*Plus: Release23.0.0.0.0 - Production on Wed May 810:12:372024
207Version23.4.0.24.05
208
209Copyright (c) 1982, 2024, Oracle. All rights reserved.
210
211
212Connected to:
213OracleDatabase23ai Free Release23.0.0.0.0 - Develop, Learn, and Run for Free
214Version23.4.0.24.05
215
216SQL> show pdbs;
217
218 CON_ID CON_NAME OPEN MODE RESTRICTED
219---------- ------------------------------ ---------- ----------
220 2 PDB$SEED READ ONLY NO
221 3 FREEPDB1 READ WRITE NO
222
223SQL> SELECT BANNER_FULL FROM V$VERSION;
224
225BANNER_FULL
226--------------------------------------------------------------------------------
227Oracle Database 23ai Free Release23.0.0.0.0 - Develop, Learn, and Run for Free
228Version23.4.0.24.05
229SQL> exit
230Disconnected fromOracleDatabase23ai Free Release23.0.0.0.0 - Develop, Learn, and Run for Free
231Version23.4.0.24.05
232[oracle@lhrora23ai ~]$ lsnrctl status
233
234LSNRCTL for Linux: Version23.0.0.0.0 - Production on08-MAY-202410:12:56
235
236Copyright (c) 1991, 2024, Oracle. All rights reserved.
237
238Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))
239STATUSof the LISTENER
240------------------------
241Alias LISTENER
242Version TNSLSNR for Linux: Version23.0.0.0.0 - Production
243StartDate08-MAY-202410:08:48
244Uptime 0days0 hr. 4 min. 8 sec
245TraceLeveloff
246SecurityON: Local OS Authentication
247SNMP OFF
248Default Service FREE
249Listener Parameter File /opt/oracle/product/23ai/dbhomeFree/network/admin/listener.ora
250Listener LogFile /opt/oracle/diag/tnslsnr/lhrora23ai/listener/alert/log.xml
251Listening Endpoints Summary...
252 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
253 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
254Services Summary...
255Service "17e8d14f2fed1b40e0633f005cc01689" has 1instance(s).
256Instance"FREE", status READY, has 1handler(s) for this service...
257Service "FREE" has 1instance(s).
258Instance"FREE", status READY, has 1handler(s) for this service...
259Service "FREEXDB" has 1instance(s).
260Instance"FREE", status READY, has 1handler(s) for this service...
261Service "freepdb1" has 1instance(s).
262Instance"FREE", status READY, has 1handler(s) for this service...
263The command completed successfully
264[oracle@lhrora23ai ~]$
參考
https://www.oracle.com/autonomous-database/free-trial/#free-container-image
https://www.oracle.com/cn/database/free/get-started/
https://blogs.oracle.com/database/post/oracle-23ai-now-generally-available
https://www.oracle.com/middleware/technologies/goldengate-downloads.html
https://github.com/oracle/adb-free/pkgs/container/adb-free
https://www.oracle.com/autonomous-database/free-trial/#free-container-image
https://container-registry.oracle.com/ords/f?p=113:4:13084705098350:::4:P4_REPOSITORY,AI_REPOSITORY,AI_REPOSITORY_NAME,P4_REPOSITORY_NAME,P4_EULA_ID,P4_BUSINESS_AREA_ID:2223,2223,Oracle Autonomous Database Free,Oracle Autonomous Database Free,1,0&cs=36WAZybiaPLYZX3f4LbRiOCmnYfsOyiwMqI48mSbynAMTYlW83KU6g6J-hFClZBwHoC0j0SxwONsyV_tKrL5HmQ
https://xmmup.com/dbbao37zaidockerzhongkuaisushiyonggegebanbencong10gdao19cdeoracleshu.html
https://www.xmmup.com/zaidockerzhongkuaisutiyanoracle-23aiban.html