作者 | 夜说
个人公众号 | 夜说的数据库笔记
原文链接 | Oracle:RHEL7.5安装Oracle19C单实例(图形界面版)
目录
01前言
本文基于红帽7.5系统安装Oracle19C单实例,使用图形界面进行安装。
02安装说明
一、系统版本(带GUI安装)
[root@oracle19c ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.5 (Maipo)
二、磁盘大小
[root@oracle19c ~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/rhel-root xfs 71G 3.4G 68G 5% /
devtmpfs devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs tmpfs 1.9G 13M 1.9G 1% /run
tmpfs tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sda1 xfs 1014M 170M 845M 17% /boot
tmpfs tmpfs 378M 8.0K 378M 1% /run/user/42
tmpfs tmpfs 378M 0 378M 0% /run/user/0
三、内存大小
[root@oracle19c ~]# free -g
total used free shared buff/cache available
Mem: 3 0 2 0 0 2
Swap: 7 0 7
四、cpu信息
[root@oracle19c ~]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 151
model name : 12th Gen Intel(R) Core(TM) i5-12400F
五、数据库安装包
[root@oracle19c ~]# ll LINUX.X64_193000_db_home.zip
-rw-r--r--. 1 root root 3059705302 May 14 16:00 LINUX.X64_193000_db_home.zip
03安装前配置
3.1关闭防火墙和SELINUX
一、关闭防火墙
[root@oracle19c ~]# systemctl stop firewalld.service
[root@oracle19c ~]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
二、关闭SELINUX
永久关闭,需要重启生效
[root@oracle19c ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@oracle19c ~]# getenforce
Disabled
临时关闭
[root@oracle19c ~]# setenforce 0
[root@oracle19c ~]# getenforce
Permissive
3.2禁用numa和透明大页
在GRUB_CMDLINE_LINUX后面添加numa=off transparent_hugepage=never
[root@oracle19c ~]# vi /etc/default/grub
[root@oracle19c ~]# cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet numa=off transparent_hugepage=never"
GRUB_DISABLE_RECOVERY="true"
[root@oracle19c ~]# grub2-mkconfig -o /etc/grub2.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-862.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-862.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-c6551ab80cdd44498638640c6faf4445
Found initrd image: /boot/initramfs-0-rescue-c6551ab80cdd44498638640c6faf4445.img
done
[root@oracle19c ~]#
重启生效
检查numa是否关闭
[root@oracle19c ~]# dmesg | grep -i numa
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.10.0-862.el7.x86_64 root=/dev/mapper/rhel-root ro crashkernel=auto rd.lvm.lv=rhel/roo