@clisdodo
2019-11-12T15:50:49.000000Z
字数 4739
阅读 6034
Oracle19.3
centos8
AskScuti :搭建类 1-1-2 Oracle 19c 单实例文件系统在 CentOS 8 上的安装
systemctl stop firewalld.service
systemctl disable firewalld.service
SELINUX=disabled
echo "192.168.1.10 askscuti" >> /etc/hosts
编辑 vim /etc/sysctl.conf
添加以下行
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1887436
kernel.shmmax = 7730941132
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
执行命令 sysctl -p
刷新
编辑文件 vim /etc/security/limits.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 7549747
oracle soft memlock 7549747
定义本地YUM源
[root@askscuti ~]# mkdir /repobak
[root@askscuti ~]# cd /etc/yum.repos.d/
[root@askscuti yum.repos.d]# mv * /repobak/
echo "[henry_baseos]" >> henry.repo
echo "name=19cbaseos" >> henry.repo
echo "baseurl=file:///mnt/BaseOS/" >> henry.repo
echo "enabled=1" >> henry.repo
echo "gpgcheck=0" >> henry.repo
echo "[henry_appstream]" >> henry.repo
echo "name=19cappstream" >> henry.repo
echo "baseurl=file:///mnt/AppStream/" >> henry.repo
echo "enabled=1" >> henry.repo
echo "gpgcheck=0" >> henry.repo
cat henry.repo
yum repolist all
安装包
dnf install -y bc
dnf install -y binutils
dnf install -y compat-libstdc++-33
dnf install -y elfutils-libelf
dnf install -y elfutils-libelf-devel
dnf install -y fontconfig-devel
dnf install -y glibc
dnf install -y glibc-devel
dnf install -y ksh
dnf install -y libaio
dnf install -y libaio-devel
dnf install -y libXrender
dnf install -y libXrender-devel
dnf install -y libX11
dnf install -y libXau
dnf install -y libXi
dnf install -y libXtst
dnf install -y libgcc
dnf install -y librdmacm-devel
dnf install -y libstdc++
dnf install -y libstdc++-devel
dnf install -y libxcb
dnf install -y make
dnf install -y net-tools # Clusterware
dnf install -y nfs-utils # ACFS
dnf install -y python # ACFS
dnf install -y python-configshell # ACFS
dnf install -y python-rtslib # ACFS
dnf install -y python-six # ACFS
dnf install -y targetcli # ACFS
dnf install -y smartmontools
dnf install -y sysstat
dnf install -y unixODBC
dnf install -y libnsl2
dnf install -y libnsl2.i686
dnf install -y tigervnc*
dnf install -y libnsl*
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
useradd -u 54321 -g oinstall -G dba,oper oracle
passwd oracle
mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1
mkdir -p /u01/app/oraInventory
chown -R oracle:oinstall /u01
chmod -R 775 /u01
[root@askscuti ~]# mkdir /home/oracle/scripts
cat > /home/oracle/scripts/setEnv.sh <<EOF
# Oracle Settings
export TMP=/tmp
export TMPDIR=\$TMP
export ORACLE_HOSTNAME=askscuti
export ORACLE_UNQNAME=CDB19C
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=\$ORACLE_BASE/product/19.0.0/dbhome_1
export ORA_INVENTORY=/u01/app/oraInventory
export ORACLE_SID=CDB19C
export PDB_NAME=ORDERS
export PATH=/usr/sbin:/usr/local/bin:\$PATH
export PATH=\$ORACLE_HOME/bin:\$PATH
export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib
EOF
export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib
echo ". /home/oracle/scripts/setEnv.sh" >> /home/oracle/.bash_profile
chown -R oracle:oinstall /soft
chmod -R 775 /soft
su - oracle
cd $ORACLE_HOME
unzip -q /soft/19c-V982063-01.zip
export CV_ASSUME_DISTID=RHEL7.6
# 图形安装
./runInstaller
# 静默安装
./runInstaller -ignorePrereq -waitforcompletion -silent \
-responseFile /u01/app/oracle/product/19.0.0/dbhome_1/install/response/db_install.rsp \
oracle.install.option=INSTALL_DB_SWONLY \
ORACLE_HOSTNAME=henry \
UNIX_GROUP_NAME=oinstall \
INVENTORY_LOCATION=/u01/app/oraInventory \
SELECTED_LANGUAGES=en,en_GB \
ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1 \
ORACLE_BASE=/u01/app/oracle \
oracle.install.db.InstallEdition=EE \
oracle.install.db.OSDBA_GROUP=dba \
oracle.install.db.OSOPER_GROUP=oper \
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
As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/oracle/product/19.0.0/dbhome_1/root.sh
# 图形创建
netca
# 静默创建
netca -silent -responseFile /u01/app/oracle/product/19.0.0/dbhome_1/assistants/netca/netca.rsp
# 图形创建
dbca
# 静默创建
dbca -silent -createDatabase -templateName General_Purpose.dbc \
-gdbname CDB19C \
-sid CDB19C \
-databaseConfigType SI \
-createAsContainerDatabase TRUE \
-numberOfPDBs 1 \
-pdbName ORDERS \
-useLocalUndoForPDBs TRUE \
-pdbAdminPassword oracle \
-sysPassword oracle \
-systemPassword oracle \
-characterSet AL32UTF8 \
-memoryPercentage 40