合 Oracle Database 23c免费开发者版单机安装
使用rpm包快速安装Oracle 23c免费开发者版
熟悉Oralce的朋友可能会发现,从19c开始,提供了非常简洁的数据库安装与创建方法,大大降低了Oracle数据库的使用门槛,因为对于初学者来说,首先要有一套可用的环境,才能为后续的学习做好准备。
安装
本次主机环境为Oracle Linux Server 8.7,下载及安装:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | docker rm -f lhroel87 docker run -itd --name lhroel87 -h lhroel87 \ -p 1521:1521 -p 38389:3389 \ -v /sys/fs/cgroup:/sys/fs/cgroup \ --privileged=true oraclelinux:8.7 \ /usr/sbin/init docker exec -it lhroel87 bash curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo yum install -y https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo dnf install -y openssh openssh-clients openssh-server \ initscripts net-tools telnet which wget passwd lrzsz sudo unzip \ tree traceroute lsof file tar systemd sysstat curl \ strace less bash bash-completion sed zip \ yum-utils ethtool iputils screen dnf -y groupinstall "Development tools" wget https://yum.oracle.com/repo/OracleLinux/OL8/developer/x86_64/getPackage/oracle-database-preinstall-23c-1.0-0.5.el8.x86_64.rpm wget https://download.oracle.com/otn-pub/otn_software/db-free/oracle-database-free-23c-1.0-1.el8.x86_64.rpm yum -y install oracle-database-preinstall-23c-1.0-0.5.el8.x86_64.rpm yum -y install oracle-database-free-23c-1.0-1.el8.x86_64.rpm |
至此,Oracle Database 23c软件安装完毕。
创建数据库
接下来可以按照提示,创建数据库,您可以修改数据库创建脚本,也可以使用默认值。
配置文件:
1 | /etc/sysconfig/oracle-free-23c.conf |
可配置项很少:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | [root@lhroel87 soft]# cat /etc/sysconfig/oracle-free-23c.conf #This is a configuration file to setup the Oracle Database. #It is used when running '/etc/init.d/oracle-free-23c configure'. # LISTENER PORT used Database listener, Leave empty for automatic port assignment LISTENER_PORT= # Character set of the database CHARSET=AL32UTF8 # Database file directory # If not specified, database files are stored under Oracle base/oradata DBFILE_DEST= # DB Domain name DB_DOMAIN= # SKIP Validations, memory, space SKIP_VALIDATIONS=false |
为了方便,直接使用默认脚本。使用root用户执行如下脚本:
1 2 | /etc/init.d/oracle-free-23c configure /etc/init.d/oracle-free-23c status |