首先在edelivery中下载Oracle Linux 8.0
然后就默认安装系统环境准备工具目前不支持OL8,所以需要手动安装,首先设置内核参数,在/etc/sysctl.conf追加
[root@localhost ~]# cat /etc/sysctl.conf |grep -v ^#|grep -v ^$
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
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.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
[root@localhost ~]#
sysctl -p使参数生效
然后/etc/security/limits.d/oracle-database-preinstall-19c.conf中添加
[root@localhost limits.d]# cat /etc/security/limits.d/oracle-database-preinstall-19c.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 134217728
oracle soft memlock 134217728
[root@localhost limits.d]#
安装依赖软件
dnf install -y bc binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libXrender libXrender-devel libX11 libXau libXi libXtst libgcc librdmacm-devel libstdc++ libstdc++-devel libxcb make net-tools nfs-utils Python3 python3-configshell python3-rtslib python3-six targetcli smartmontools sysstat unixODBC libnsl libnsl.i686 libnsl2 libnsl2.i686
创建用户组和用户
[root@localhost limits.d]# groupadd -g 1001 oinstall
[root@localhost limits.d]# groupadd -g 1002 dba
[root@localhost limits.d]# groupadd -g 1003 oper
[root@localhost limits.d]# useradd -u 1001 -g oinstall -G dba,oper oracle
[root@localhost limits.d]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@localhost limits.d]#
创建目录
[root@localhost ~]# mkdir -p /u01/app/oraInventory
[root@localhost ~]# mkdir -p /u01/app/oracle/product/19.3.0/dbhome_1
[root@localhost ~]# chown -R oracle: /u01/app/oraInventory
[root@localhost ~]# chown -R oracle: /u01/app/oracle
[root@localhost ~]# su - oracle
[oracle@localhost db]$ unzip -q /stage/db/V982063-01.zip -d /u01/app/oracle/product/19.3.0/dbhome_1/
[oracle@localhost db]$
开始安装,注意版本兼容问题要先设置环境变量export CV_ASSUME_DISTID=RHEL7.6
[oracle@localhost ~]$ export CV_ASSUME_DISTID=RHEL7.6
[oracle@localhost ~]$ /u01/app/oracle/product/19.3.0/dbhome_1/runInstaller -ignorePrereq -waitforcompletion -silent \
> -responseFile /u01/app/oracle/product/19.3.0/dbhome_1/install/response/db_install.rsp \
> oracle.install.option=INSTALL_DB_SWONLY \
> .ORACLE_HOSTNAME=OL8.0_19C \
> UNIX_GROUP_NAME=oinstall \
> INVENTORY_LOCATION=/u01/app/oraInventory \
> SELECTED_LANGUAGES=en,en_GB \
> ORACLE_HOME=/u01/app/oracle/product/19.3.0/dbhome_1 \
> ORACLE_BASE=/u01/app/oracle \
> oracle.install.db.InstallEdition=EE \
> oracle.install.db.OSDBA_GROUP=dba \
> oracle.install.db.OSBACKUPDBA_GROUP=dba \
> oracle.install.db.OSDGDBA_GROUP=dba \
> oracle.install.db.OSKMDBA_GROUP=dba \
> oracle.install.db.OSRACDBA_GROUP=dba \
> SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \
> DECLINE_SECURITY_UPDATES=true
Launching Oracle Database Setup Wizard...
The response file for this session can be found at:
/u01/app/oracle/product/19.3.0/dbhome_1/install/response/db_2019-08-17_12-41-50PM.rsp
You can find the log of this install session at:
/tmp/InstallActions2019-08-17_12-41-50PM/installActions2019-08-17_12-41-50PM.log
As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/oracle/product/19.3.0/dbhome_1/root.sh
Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:
[localhost]
Execute /u01/app/oracle/product/19.3.0/dbhome_1/root.sh on the following nodes:
[localhost]
Successfully Setup Software.
Moved the install session logs to:
/u01/app/oraInventory/logs/InstallActions2019-08-17_12-41-50PM
[oracle@localhost ~]$ su - root
Password:
[root@localhost ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@localhost ~]# /u01/app/oracle/product/19.3.0/dbhome_1/root.sh
Check /u01/app/oracle/product/19.3.0/dbhome_1/install/root_localhost.localdomain_2019-08-17_12-44-20-885851348.log for the output of root script
[root@localhost ~]#
代码是