安装版本:
Linux:CentOS Linux release 8.3.2011
Oracle:19C
系统配置:
下载Oracle19c安装包
https://www.oracle.com/database/technologies/oracle19c-linux-downloads.html
创建组和用户
[root@localhost ~]# groupadd oinstall
[root@localhost ~]# groupadd dba
[root@localhost ~]# groupadd asmdba
[root@localhost ~]# groupadd backupdba
[root@localhost ~]# groupadd dgdba
[root@localhost ~]# groupadd kmdba
[root@localhost ~]# groupadd racdba
[root@localhost ~]# groupadd oper
[root@localhost ~]# useradd -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper oracle19
[root@localhost ~]# passwd oracle19
Changing password for user oracle19.
New password:
BAD PASSWORD: The password contains the user name in some form
Retype new password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]#
[root@localhost ~]# mkdir -p /u01/app/oracle19/product/19.2.0/db_1
[root@localhost ~]# chown -R oracle19:oinstall /u01/app/oracle19/
[root@localhost ~]# su - oracle19
[oracle19@localhost ~]$ vi .bash_profile
export ORACLE_HOME=/u01/app/oracle19/product/19.2.0/db_1
export PATH=$PATH:/u01/app/oracle19/product/19.2.0/db_1/bin
export ORACLE_SID=orcl
[oracle19@localhost ~]$ source .bash_profile
[oracle19@localhost db_1]$ pwd
/u01/app/oracle19/product/19.2.0/db_1
[oracle19@localhost db_1]$ ll -h
total 2.9G
-rw-rw-r--. 1 oracle19 oinstall 2.9G Jun 13 19:22 LINUX.X64_193000_db_home.zip
[oracle19@localhost db_1]$
[oracle19@localhost db_1]$ unzip LINUX.X64_193000_db_home.zip
禁用防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl status firewalld.service
关闭selinux:
编辑/etc/selinux/config 文件
sed -i s'\enforcing\disable\g' /etc/selinux/config
安装依赖包
yum install bc binutils compat-libcap1 compat-libstdc++33 elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libXrender libXrender-devel libgcc libstdc++ libstdc++-devel libxcb make smartmontools sysstat kmod*
包compat-libstdc+±33-3.2.3 单独手动下载上传安装
下载连接:compat-libstdc+±33-3.2.3-72下载地址
安装yum -y install xdpyinfo
执行安装
[oracle19@localhost db_1]$ export DISPLAY=192.168.0.104:0.0
安装遇到了一个不错,折腾了2小时也没解决成功
[oracle19@localhost db_1]$ ./runInstaller
/u01/app/oracle19/product/19.2.0/db_1/perl/bin/perl: error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such file or directory
最后在https://www.modb.pro/db/37968找到了解决方法
[root@localhost lib]# dnf install libnsl
再次执行安装遇到报错:
[INS-08101] Unexpected error while executing the action at state: ‘supportedOSCheck
解决方法:
添加 "export CV_ASSUME_DISTID=OEL7"到 /home/oracle19/.bash_profile
[oracle19@localhost db_1]$ source /home/oracle19/.bash_profile
开始安装
遇到错误
发现是因为自己没有把app的权限给够
[root@localhost oracle19]# cd /u01/
[root@localhost u01]# ll
total 0
drwxr-xr-x. 3 root root 22 Jun 13 20:32 app
[root@localhost u01]# chown -R oracle19:oinstall app/
修改后继续安装
Swap分区没有给够,需要修改
[root@localhost u01]# cd /usr/
[root@localhost usr]# mkdir swap
[root@localhost usr]# cd swap/
[root@localhost swap]# dd if=/dev/zero of=swapfile bs=200M count=5
[root@localhost swap]# mkswap /usr/swap/swapfile
[root@localhost swap]# swapon /usr/swap/swapfile
[root@localhost swap]# free -h
在/etc/fstab增加一行/usr/swap/swapfile swap swap defaults 0 0
[root@localhost swap]# vim /etc/fstab
然后swap的空间已经够了,继续安装
安装进行中
询问是否执行脚本,选择yes
Oracle19c软件安装成功
创建数据库
此处需要设置密码,设置的密码自己要记住
数据库安装中
数据库安装完成
如果有遇到别的问题,欢迎留下问题,大家一起讨论学习!