简介
有关之前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
image-20240507163449709
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: Release 23.0.0.0.0 - Production on Tue May 7 08:29:40 2024
39Version 23.4.0.24.05
40
41Copyright (c) 1982, 2024, Oracle. All rights reserved.
42
43
44Connected to:
45Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
46Version 23.4.0.24.05
47
48SQL> SELECT BANNER_FULL FROM V$VERSION;
49
50BANNER_FULL
51--------------------------------------------------------------------------------
52Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
53Version 23.4.0.24.05
54
55
56SQL> show pdbs
57
58 CON_ID CON_NAME OPEN MODE RESTRICTED
59---------- ------------------------------ ---------- ----------
60 2 PDB$SEED READ ONLY NO
61 3 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 release 8.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 -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 8 09:29:36 2024.
34Dependencies resolved.
35========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
36 Package Architecture Version Repository Size
37========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
38Installing:
39 oracle-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========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
45Install 2 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 transaction check
55Transaction check succeeded.
56Running transaction test
57Transaction test 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 8 09:29:36 2024.
75Dependencies resolved.
76========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
77 Package Architecture Version Repository Size
78========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
79Installing:
80 oracle-database-free-23ai x86_64 1.0-1 @commandline 1.3 G
81
82Transaction Summary
83========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
84Install 1 Package
85
86Total size: 1.3 G
87Installed size: 3.6 G
88Downloading Packages:
89Running transaction check
90Transaction check succeeded.
91Running transaction test
92Transaction test 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 Oracle Database Free, optionally modify the parameters in '/etc/sysconfig/oracle-free-23ai.conf' and then 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:
105 oracle-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 password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts:
138Confirm the password:
139Configuring Oracle Listener.
140Listener configuration succeeded.
141Configuring Oracle Database FREE.
142Enter SYS user password:
143****
144Enter SYSTEM user password:
145****
146Enter PDBADMIN User Password:
147***
148Prepare for db operation
1497% complete
150Copying database files
15129% complete
152Creating and starting Oracle instance
15330% complete
15433% complete
15536% complete
15639% complete
15743% complete
158Completing Database Creation
15947% complete
16049% complete
16150% complete
162Creating Pluggable Databases
16354% complete
16471% complete
165Executing Post Configuration Actions
16693% complete
167Running Custom Scripts
168100% complete
169Database creation complete. For details check the logfiles at:
170 /opt/oracle/cfgtoollogs/dbca/FREE.
171Database Information:
172Global Database Name:FREE
173System Identifier(SID):FREE
174Look at the log file "/opt/oracle/cfgtoollogs/dbca/FREE/FREE.log" for further details.
175
176Connect to Oracle Database using one of the connect strings:
177 Pluggable database: lhrora23ai/FREEPDB1
178 Multitenant container database: lhrora23ai
179[root@lhrora23ai soft]#
180[root@lhrora23ai soft]# /etc/init.d/oracle-free-23ai status
181Status of the Oracle FREE 23ai service:
182
183LISTENER status: RUNNING
184FREE Database status: RUNNING
185[root@lhrora23ai soft]# ps -ef|grep pmon
186oracle 6715 0 0 10:11 ? 00:00:00 db_pmon_FREE
187root 7215 26 0 10:11 pts/1 00:00:00 grep --color=auto pmon
188[root@lhrora23ai soft]#
189[root@lhrora23ai soft]# cat >> /home/oracle/.bash_profile export ORACLE_SID=FREE
192> export PATH=$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 8 10:11:50 CST 2024 on pts/1
204[oracle@lhrora23ai ~]$ sas
205
206SQL*Plus: Release 23.0.0.0.0 - Production on Wed May 8 10:12:37 2024
207Version 23.4.0.24.05
208
209Copyright (c) 1982, 2024, Oracle. All rights reserved.
210
211
212Connected to:
213Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
214Version 23.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 Release 23.0.0.0.0 - Develop, Learn, and Run for Free
228Version 23.4.0.24.05
229SQL> exit
230Disconnected from Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
231Version 23.4.0.24.05
232[oracle@lhrora23ai ~]$ lsnrctl status
233
234LSNRCTL for Linux: Version 23.0.0.0.0 - Production on 08-MAY-2024 10: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)))
239STATUS of the LISTENER
240------------------------
241Alias LISTENER
242Version TNSLSNR for Linux: Version 23.0.0.0.0 - Production
243Start Date 08-MAY-2024 10:08:48
244Uptime 0 days 0 hr. 4 min. 8 sec
245Trace Level off
246Security ON: Local OS Authentication
247SNMP OFF
248Default Service FREE
249Listener Parameter File /opt/oracle/product/23ai/dbhomeFree/network/admin/listener.ora
250Listener Log File /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 1 instance(s).
256 Instance "FREE", status READY, has 1 handler(s) for this service...
257Service "FREE" has 1 instance(s).
258 Instance "FREE", status READY, has 1 handler(s) for this service...
259Service "FREEXDB" has 1 instance(s).
260 Instance "FREE", status READY, has 1 handler(s) for this service...
261Service "freepdb1" has 1 instance(s).
262 Instance "FREE", status READY, has 1 handler(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%20Autonomous%20Database%20Free,Oracle%20Autonomous%20Database%20Free,1,0&cs=36WAZybiaPLYZX3f4LbRiOCmnYfsOyiwMqI48mSbynAMTYlW83KU6g6J-hFClZBwHoC0j0SxwONsyV_tKrL5HmQ
https://xmmup.com/dbbao37zaidockerzhongkuaisushiyonggegebanbencong10gdao19cdeoracleshu.html
https://www.xmmup.com/zaidockerzhongkuaisutiyanoracle-23aiban.html