Oracle在19年2月13日发不了Oracle 19c的exadata版本,可以在Linux平台进行测试。
下载地址:https://edelivery.oracle.com/
首先在mos上查看19c的认证系统,19c相当于Oracle 12.2.0.3,是Oracle 12的终极版本。目前查看认证只是在Oracle Linux 7上,本次测试环境为RHEL 7.5
安装环境:
RHEL 7.5 x86_64
Oracle 19c
安装过程:
涉及安装目录及参数调整:
##创建目录
mkdir -p /oracle/product/12.2/db
##创建用户
groupadd -g 1200 oinstall
groupadd -g 1201 dba
groupadd -g 1202 oper
groupadd -g 1203 backupdba
groupadd -g 1204 dgdba
groupadd -g 1205 kmdba
useradd -m -d /home/oracle -u 1101 -g oinstall -G dba,oper,backupdba,dgdba,kmdba oracle
chown -R oracle:oinstall /oracle
echo 'oracle' | passwd oracle --stdin
##关闭防火墙
sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config
systemctl stop firewalld
systemctl disable firewalld
##配置内核参数
#kernel.shmmax = 内存/2*1024*1024*1024 3G
#kernel.shmall = shmmax/4096
cat <
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 786048
kernel.shmmax = 3221225472
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.ip_local_port_range = 32768 61000
fs.aio-max-nr = 3145728
#vm.nr_hugepages = 92200
vm.vfs_cache_pressure=200
vm.swappiness=10
vm.min_free_kbytes=524288
vm.dirty_ratio = 5
vm.dirty_background_ratio=5
vm.dirty_writeback_centisecs=100
vm.dirty_expire_centisecs=100
vm.drop_caches=3
vm.overcommit_memory=2
kernel.panic = 10
kernel.sysrq=1
eof
sysctl -p
cat <
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 3145728
oracle soft memlock 3145728
eof
echo "session required pam_limits.so" >> /etc/pam.d/login
##禁用THP
###关闭THP
# cat /sys/kernel/mm/transparent_hugepage/enabled
#[always] madvise never <<---- THP is enabled
sed -i 's#GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet"#GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=rhel/root r
d.lvm.lv=rhel/swap rhgb quiet transparent_hugepage=never"#' /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg
###禁用avahi-daemon
##systemctl stop avahi-daemon
##systemctl disable avahi-daemon
##systemctl status avahi-daemon
####设置RemoveIPC=false
echo "RemoveIPC=no" >> /etc/systemd/logind.conf
#重启systemd-logind服务或重启主机
# systemctl daemon-reload
# systemctl restart systemd-logind
###参考:ALERT: Setting RemoveIPC=yes on Redhat 7.2 Crashes ASM and Database Instances as Well as Any Application That Uses a Shared Memory Segment (SHM) or
Semaphores (SEM) (文档 ID 2081410.1)
###如果后续OS升级后,也需要检查这个参数,以避免相关问题
cat <
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
eof
##调整存储:红帽7默认deadline不需要调整
###[root@rhdb01 rpm]# more /sys/block/sdb/queue/scheduler
###noop deadline [cfq]
##echo deadline > /sys/block/sdb/queue/scheduler
##配置oracle环境变量
cat <
export ORACLE_BASE=/oracle/product
export ORACLE_HOME=/oracle/product/19/db
export PATH=\$PATH:\$ORACLE_HOME/bin:\$ORACLE_HOME/OPatch
export ORACLE_SID=rh19c
eof
安装数据库所需软件包:
通过yum可以访问系统ISO,安装方式如下:
yum -y install compat-libcap1.x86_64 compat-libstdc++-33.x86_64 ksh.x86_64 libaio-devel.x86_64 gcc-c++.x86_64 libstdc++-devel.x86_64 smartmontools.x86_64 sysstat.x86_64 xorg-x11-utils-7.5-22.el7.x86_64
除此以为需要下载compat-libstdc++-33软件包,否则在使用Oracle Text时容易出现问题。
下载地址:https://access.redhat.com/downloads/content/compat-libstdc++-33/3.2.3-72.el7/x86_64/fd431d51/package
Oracle从18c开始database软件直接解压到ORACLE_HOME目录下
解压文件:
unzip V981623-01.zip -d /oracle/product/19/db/
开始安装:
export DISPLAY=192.168.15.125:0.0
./runInstaller
选择只安装软件:
由于虚拟机配置内存较小,shmall参数告警可忽略。
安装compat软件:
rpm -ivh compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
安装完成后,使用root用户执行两个脚本:
/oracle/oraInventory/orainstRoot.sh
/oracle/product/19/db/root.sh
通过netca创建监听,和以往11g界面一致。
通过dbca创建数据库:
选择指定的字符集:
数据库参数调整如下,具体情况需根据实际情况进行调整:
alter system set db_file_multiblock_read_count=32 scope=spfile sid='*';
alter system set max_dump_file_size = '500M' scope=spfile sid='*';
alter system set "_memory_imm_mode_without_autosga"=FALSE scope=spfile sid='*';
alter system set job_queue_processes=100 scope=spfile sid='*';
alter system set DB_FILES=4096 scope=spfile sid='*';
alter system set nls_date_format='YYYY-MM-DD HH24:MI:SS' scope=spfile sid='*';
alter system set open_cursors=3000 scope=spfile sid='*';
alter system set open_links_per_instance=48 scope=spfile sid='*';
alter system set open_links=100 scope=spfile sid='*';
alter system set parallel_max_servers=20 scope=spfile sid='*';
alter system set session_cached_cursors=200 scope=spfile sid='*';
alter system set undo_retention=10800 scope=spfile sid='*';
alter system set "_undo_autotune"=false scope=spfile sid='*';
alter system set "_partition_large_extents"=false scope=spfile sid='*';
alter system set "_use_adaptive_log_file_sync"=false scope=spfile sid='*';
alter system set "_optimizer_use_feedback"=false scope=spfile sid='*';
alter system set deferred_segment_creation=false scope=spfile sid='*';
alter system set "_external_scn_logging_threshold_seconds"=600 scope=spfile sid='*';
alter system set "_external_scn_rejection_threshold_hours"=24 scope=spfile sid='*';
alter system set result_cache_max_size=0 scope=spfile sid='*';
alter system set "_cleanup_rollback_entries"=2000 scope=spfile sid='*';
alter system set parallel_force_local=true scope=spfile sid='*'; --rac
alter system set "_gc_policy_time"=0 scope=spfile sid='*';
alter system set "_clusterwide_global_transactions"=false scope=spfile sid='*';
alter system set "_library_cache_advice"=false scope=both sid='*';
alter system set db_cache_advice=off scope=both sid='*';
alter system set filesystemio_options=setall scope=spfile sid='*';
alter system set fast_start_mttr_target=300 scope=spfile sid='*';
alter profile default limit PASSWORD_LIFE_TIME UNLIMITED;
alter profile ORA_STIG_PROFILE limit PASSWORD_LIFE_TIME UNLIMITED;
begin
DBMS_AUTO_TASK_ADMIN.DISABLE(
client_name => 'sql tuning advisor',
operation => NULL,
window_name => NULL);
end;
/
begin
DBMS_AUTO_TASK_ADMIN.DISABLE(
client_name => 'auto space advisor',
operation => NULL,
window_name => NULL);
end;
/
重启数据库后完成安装。